Results 1 to 2 of 2
- 06-25-2013, 05:40 PM #1Member
- Join Date
- Jun 2013
- Rep Power
[Done] Need help for aligning JButton(to fit more text in less space)
I am making a swing application, and I came across a problem.
I created a JButton, used for submitting data from a JTextField.
I then realized that the button was 1.5 times as wide as the text.
All I want is a small button that isn't so wide.
Thank you to anyone that reads this and gives help so I can create my App.
Answer: button1.setMargin(new Insets(5,5,5,5));
Last edited by BenMoon; 06-25-2013 at 09:20 PM.
- 06-25-2013, 06:35 PM #2
- By waelyafooz in forum New To JavaReplies: 0Last Post: 11-18-2012, 09:00 AM
- By rru96 in forum New To JavaReplies: 1Last Post: 11-13-2012, 04:27 AM
- By loki in forum New To JavaReplies: 10Last Post: 04-26-2009, 11:52 AM
- By rick_cols in forum SWT / JFaceReplies: 0Last Post: 09-18-2008, 08:20 PM
- By Gajesh Tripathi in forum AWT / SwingReplies: 2Last Post: 12-01-2007, 07:44 AM