Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting the default component

843806Jul 23 2008 — edited Jul 23 2008
hello, i want to set a button to have the initial focus when the window is displayed. I've already searched the internet and found that pack() and button.requestFocusInWindow does the job but my problem is when i use the pack method the Dimesions i set in the components are resized and therefore the gui is destroyed. Is there another way to realize components without using the pack() method? tnx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2008
Added on Jul 23 2008
3 comments
73 views