Click here to Skip to main content
15,880,392 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi sir...i want to change button size how can i do in following code?i was try button.setsize() method but it is not working in JTabbedPane?


JFrame frame = new JFrame("Tabbed Pane Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JTabbedPane tab = new JTabbedPane();
frame.add(tab, BorderLayout.CENTER);
JButton button = new JButton("1");
tab.add("Tab 1", button);
button = new JButton("2");
tab.add("Tab 2", button);
frame.setSize(400,400);
frame.setVisible(true);
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900