Recent:
Archives:
Sign up for our technology specific newsletters.
Back to: www.javaworld.com/javaworld/javaqa/2000-03/01-qa-button.html.
You can even modify text alignment:
JButton myButton = new JButton("
HelloWorld
");
This is a great idea!
b.setLayout(new BorderLayout()); JLabel label1 = new JLabel("Your"); JLabel label2 = new JLabel("Name"); b.add(BorderLayout.NORTH,label1); b.add(BorderLayout.SOUTH,label2);
thx
More information about formatting options
Thx dude
This is a great idea!
b.setLayout(new BorderLayout());
JLabel label1 = new JLabel("Your");
JLabel label2 = new JLabel("Name");
b.add(BorderLayout.NORTH,label1);
b.add(BorderLayout.SOUTH,label2);
thx
Post new comment