Results 1 to 2 of 2
  1. #1
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default GUI Help(Layered panes, opacity, events)

    I have an application that has a component hierarchy of this

    -Frame
    -options(JPanel)
    users(JButton)
    groups(JButton)
    -layeredPane(JLayeredPane)
    -userView(JPanel)
    bunch of stuff
    -groupView(JPanel)
    bunch of stuff

    and I have a mouseClickedListener attached to users with this code inside
    Java Code:
    userView.setEnabled(true);
    userView.setVisible(true);
    userView is not opaque and starts off disabled.
    layeredPanel is not opaque and starts off enabled.

    The question I have is how come my layeredPane will not cover up userView?(I don't want userView to be visible unless the button is clicked)

    I've done something similar to this using TabbedPanes but I don't want tabs this time. I can only have 1 view showing at once and it must only show when the user presses the button.
    Liberty has never come from the government.
    Liberty has always come from the subjects of government.
    The history of liberty is the history of resistance.
    The history of liberty is a history of the limitation of governmental power, not the increase of it.

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

    Default

    I wonder if what you need is a CardLayout somewhere in the mix, so that you can hide the userView until you need it.

Similar Threads

  1. Replies: 4
    Last Post: 03-26-2009, 09:42 PM
  2. Need Help with events
    By Gatts79 in forum AWT / Swing
    Replies: 3
    Last Post: 09-23-2008, 03:18 AM
  3. Layered Pane Demo
    By Java Tip in forum javax.swing
    Replies: 0
    Last Post: 06-26-2008, 07:44 PM
  4. Two content panes in one GUI?
    By Leprechaun in forum New To Java
    Replies: 1
    Last Post: 01-31-2008, 04:02 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
  •