Hello, I'm trying to set the Height and Width of JButtons but for the life of me I can't get it going. I've tried button1.setSize(100,100); but it doesn't seem to work. Any clues? Thanks.
Don't set the layout to null. Set the size using setMinimumSize(), setPreferredSize() methods inherited from JComponent. It takes a Dimension as parameter. So the code would look like this: button.setPreferredSize(new Dimension(100, 50)); I have yet to find setting the layout to null to be needed.
Graham Spice
Greenhorn
Joined: Nov 01, 2001
Posts: 5
posted
0
Thanks for the responses, I'll give them a try... Graham
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.