jps,
I just experimented with what you have said. Its incorrect.
I created one JButton object and added it to a JFrame object.
When I invoked setPreferredSize(new Dimension(1,2)) the button...
Type: Posts; User: syedbhai
jps,
I just experimented with what you have said. Its incorrect.
I created one JButton object and added it to a JFrame object.
When I invoked setPreferredSize(new Dimension(1,2)) the button...
Hello.
You may set the dimensions using setPreferredSize() or setSize() methods.
You can also set the X and Y location for the buttons.
Just check the API - JButton (Java Platform SE 7 )
...