Results 1 to 3 of 3
- 06-28-2010, 04:24 PM #1
Member
- Join Date
- Jun 2010
- Posts
- 2
- Rep Power
- 0
setWindowOpaque causes problems at windows login.
Hi all,
Ii have an issue with setWindowOpaque(frame, false)l
I have a JFrame which is something like a Toolbar with shortcuts on it that when clicked will execute an application in a Process. The Toolbar by requirement needs to have rounded corners so we set the JFrame to opaque = false then add a background image so that we have perfectly antialiased rounded corners. Works fantastic until we lock the workstation and log back in only to find an empty toolbar with a white background. We can minimize the Toolbar and it updates / refreshes the UI and as well when clicking the buttons on the toolbar they update. If I comment out the line of code that sets the window none opaque we don't get these issues.
This can be easily replicated by creating a JFrame like so..
public void init () {
JFrame frame = new JFrame();
JPanel panel = new JPanel() {
public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
g2d.drawImage(image, 0, 0, null);
}
}
panel.setSize(200, 200);
pamel.setLayout(null);
frame.setContentPane(panel);
AWTutilities.setWindowOpaque(frame, false);
frame.setVisible(true);
}
now lock your workstation and log back in again. You should see a sqare shape in your desktop which isn't updating the UI. If anyone has seen this issue before I would really appreciate a work around or a fix..
thanks
- 06-29-2010, 12:22 PM #2
Cross poster
Swing - setWindowOpaque and AWTUtilities questions
db
- 06-29-2010, 02:12 PM #3
Member
- Join Date
- Jun 2010
- Posts
- 2
- Rep Power
- 0
Correct
Darryl is absolutely right...
If anyone has any answers to my problem please just update the thread
Swing - setWindowOpaque and AWTUtilities questions
Many thanks
Similar Threads
-
Login validation problems!
By syferite in forum AWT / SwingReplies: 3Last Post: 03-18-2011, 06:27 AM -
login.jsp
By roo7 in forum Enterprise JavaBeans (EJB)Replies: 5Last Post: 12-02-2008, 03:58 PM -
cannot open database requested in login. Login fails
By banduskank in forum JDBCReplies: 0Last Post: 06-25-2008, 12:41 PM -
problems with my JSP login page
By ilangocal in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-28-2008, 06:40 PM -
problems with Login
By Peter in forum Java ServletReplies: 2Last Post: 06-12-2007, 01:50 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks