permaculture playing cards*
The moose likes Beginning Java and the fly likes Any ideas on how to insert a JLabel directly above an existing GridLayout ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Any ideas on how to insert a JLabel directly above an existing GridLayout ?" Watch "Any ideas on how to insert a JLabel directly above an existing GridLayout ?" New topic
Author

Any ideas on how to insert a JLabel directly above an existing GridLayout ?

WeiJie Lim
Ranch Hand

Joined: Sep 05, 2012
Posts: 85
I have already arranged the 4 buttons and the top JLabel and JTextfield in a GridLayout.

But now I am trying to add a small phrase above the GridLayout. ( The circled phrase in red in the image image )

Any ideas on how to go about doing it ?


K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2563
    
    9

Did you try using another JPanel and put the JLabel and GridLayout panel in this JPanel?


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
WeiJie Lim
Ranch Hand

Joined: Sep 05, 2012
Posts: 85
I found the answer, it may help others in the future who stumble upon this thread, so I will just post it here

 
jQuery in Action, 2nd edition
 
subject: Any ideas on how to insert a JLabel directly above an existing GridLayout ?