Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-10-2007, 10:58 PM
Member
 
Join Date: Nov 2007
Posts: 24
SwinGirl is on a distinguished road
GlassPane problem
hi! Here again!
I have this glass panel, wich it´s not actually working...
I mean.. the panel avoid to user get the components behind, but is not showing the label, and the opacity, and the color i´ve setted on it.
Code:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { MyGlassPane glassPane = new MyGlassPane(); glassPane.setOpaque(true); // JFrame f = (JFrame)WindowManager.getDefault().getMainWindow(); // f.setGlassPane(glassPane); JRootPane root SwingUtilities.getRootPane(component.getPanel().getParent()); root.setGlassPane(glassPane); root.getGlassPane(); glassPane.setEnabled(true); glassPane.setVisible(true); }
Code:
class MyGlassPane extends JComponent { public MyGlassPane(){ JLabel lbl = new JLabel(); lbl.setIcon((new javax.swing.ImageIcon(getClass().getResource("/org/myorg/guimodule/images/ajax-loader3.gif")))); this.add(lbl); lbl.setVisible(true); this.setOpaque(true); } public void paint(Graphics g) { super.paintComponent(g); g.setColor(new Color (255,255,255,100)); } }
what i´m doing wrong?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-11-2007, 03:37 PM
Member
 
Join Date: Nov 2007
Posts: 24
SwinGirl is on a distinguished road
well, i´ve fixed all things... My glassPane is visible.
I have another problem now.
I´m using Netbeans wizard dramework, on Netbeans platform.
The problem is... if the glassPane comes from root.. My root is the pltaform, not the wizard, so.. the glassPane is drawed on the platform background, and not on the wizard.
How can i fix it..?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 03:40 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org