![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Encoder
|
Size of Button before show()
JButton button = new JButton("Click here");
System.out.println(button.getWidth() + ";" + button.getHeight());The output is always 0;0 Someone in the Yahoo Programming:1 room told me, that we must show() the frame before trying to determine the width and height. But I want to get the width and height of the button before showing the frame. Can anyone solve my problem? |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|