Results 1 to 2 of 2
  1. #1
    RKhadder is offline Member
    Join Date
    Sep 2010
    Posts
    7
    Rep Power
    0

    Default Centering things a content pane

    I have both a JPanel and a content pane. how do I center the contents of each of those?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Have you gone through the Swing tutorials, in particular the section on using layout managers? That would be where I'd start as the details on the solution you seek can likely be found there. Please come back if you're still stuck after reading these pages and show us what you've got (your code).
    Much luck!

Similar Threads

  1. Update the JFrame after change the Content Pane
    By alisonchan30 in forum AWT / Swing
    Replies: 1
    Last Post: 04-26-2010, 07:22 AM
  2. Changing content pane of a JFrame?
    By dunafrothint in forum AWT / Swing
    Replies: 1
    Last Post: 03-11-2010, 11:21 PM
  3. component centering
    By BigBear in forum AWT / Swing
    Replies: 3
    Last Post: 01-25-2010, 12:48 AM
  4. Centering text of output
    By dch414 in forum New To Java
    Replies: 2
    Last Post: 10-02-2008, 11:08 PM
  5. Replies: 3
    Last Post: 01-06-2008, 12:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •