Results 1 to 5 of 5

Thread: java(opaque)

  1. #1
    tiger100plus is offline Member
    Join Date
    Nov 2008
    Location
    Kuala Lumpur,Malaysia
    Posts
    16
    Rep Power
    0

    Post java(opaque)

    Hi to everyone....,
    content panes must be opaque.....what means opaque?

    Advance

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

    Default

    Dictionary.com
    1. not transparent or translucent; impenetrable to light; not allowing light to pass through.
    4. hard to understand; not clear or lucid; obscure: The problem remains opaque despite explanations.

    I'm assuming it means the panes below cannot be seen.
    Using Top-Level Containers

    If you create your own content pane, make sure it's opaque. A JPanel object makes a good content pane because it's simple and it's opaque, by default. Note that the default layout manager for JPanel is FlowLayout; you'll probably want to change it. To make a component the content pane, use the top-level container's setContentPane method. For example:

    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.setBorder(someBorder);
    contentPane.add(someComponent, BorderLayout.CENTER);
    contentPane.add(anotherComponent, BorderLayout.SOUTH);
    topLevelContainer.setContentPane(contentPane);

    Note: Don't use non-opaque containers such as JScrollPane, JSplitPane, and JTabbedPane as content panes. A non-opaque content pane results in messy repaints. Although you can make any Swing component opaque by invoking setOpaque(true) on it, some components don't look right when they're completely opaque. For example, tabbed panes generally let part of the underlying container show through, so that the tabs look non-rectangular. So an opaque tabbed pane just tends to look bad.

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  4. #4
    tiger100plus is offline Member
    Join Date
    Nov 2008
    Location
    Kuala Lumpur,Malaysia
    Posts
    16
    Rep Power
    0

    Default

    Thanks for your explanations...it helps me a lot......

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

Posting Permissions

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