Results 1 to 6 of 6

Thread: JPanels ?

  1. #1
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default JPanels ?

    I'm sorry to have to ask this question that to some might be a dumb question ...
    I have a JPanel and when i left click my mouse in it i want a "menu" to appear. I'm guessing that the way to go is to create a new Jpanel and add the buttons to it.

    But im really confused about how i get it on top of the other panel and in the correct place ... Is the JLayeredPane the way to go?

    Thanks for your time and effort =)

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,337
    Blog Entries
    7
    Rep Power
    20

    Default Re: JPanels ?

    Read all about it in the API documentation for the JPopupMenu class.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default Re: JPanels ?

    Thanks.

  4. #4
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

    Default Re: JPanels ?

    Is there other popup panels or if I want something like a new "frame" with a closing X on the right top inside of a JPanel ... would I have to construct that myself? Thanks

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,337
    Blog Entries
    7
    Rep Power
    20

    Default Re: JPanels ?

    I don't think I understand your question but maybe a JInternalFrame can be of help ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  6. #6
    santa's Avatar
    santa is offline Senior Member
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    208
    Rep Power
    5

Similar Threads

  1. Replies: 2
    Last Post: 04-26-2011, 02:50 PM
  2. JPanels from another class
    By D.Calladine in forum New To Java
    Replies: 1
    Last Post: 12-09-2010, 08:30 PM
  3. JPanel over more JPanels..?
    By BraydenJames in forum AWT / Swing
    Replies: 7
    Last Post: 08-23-2010, 10:22 PM
  4. Problems regarding JPanels in JPanels
    By ColtonPhillips in forum AWT / Swing
    Replies: 2
    Last Post: 07-19-2010, 08:33 PM
  5. HELP with jPanels
    By maverik_vz in forum AWT / Swing
    Replies: 1
    Last Post: 03-12-2009, 11:46 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
  •