This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Issue with setting different Look and Feel in a Single Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Issue with setting different Look and Feel in a Single Application" Watch "Issue with setting different Look and Feel in a Single Application" New topic
Author

Issue with setting different Look and Feel in a Single Application

buntha Choudhary
Ranch Hand

Joined: Jul 03, 2009
Posts: 136

I am having a Frame named Frame1 and I am setting a look and feel L&F1.
Now in frame1, on clicking to a menu event and new Frame named Frame2 opens and there I set a look and feel L&F2.
Now I found that this kind of scenario is breaking the Frame1 and entire Frame1 gets hang
How to resolve this scenario.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19654
    
  18

Hanging? That's new for me. I know that the existing user interface usually doesn't get repainted when changing the look&feel, but this can be solved by using SwingUtilities.updateComponentTreeUI().

Can you show us how you change the look&feel? Perhaps you have an infinite loop somewhere.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
buntha Choudhary
Ranch Hand

Joined: Jul 03, 2009
Posts: 136

Rob Spoor wrote:Hanging? That's new for me. I know that the existing user interface usually doesn't get repainted when changing the look&feel, but this can be solved by using SwingUtilities.updateComponentTreeUI().

Can you show us how you change the look&feel? Perhaps you have an infinite loop somewhere.



Rob, actually it is not hanging. The frame1 gets blurred as soon as I click for Frame2(repainting issue).
As per you suggestion, I will work on it and update.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with setting different Look and Feel in a Single Application
 
Similar Threads
Frame as MODAL
JButton and JSP
paintComponent in JDesktopPane gives unexpected results when dragging
close and open a frame
HTML Frames and JSP!