0

I have a Swing app with a middlin complex set of nested layouts. (Multiple splitpanes and scrolpanes) One of the Jpanels in a ScrollPane in a SplitPane contains a list of Jpanels with various controls in them.

Every now and then when I resize the window, or re-fill it with a new set of panels, that panel goes into a flickering frenzy. Both scrollbars are displayed and needed, and the panel just starts flickering/jiggling as the controls in it slightly resize bigger and smaller.

I've even caught this in the debugger - and NONE of my code is being invoked. It's all inside the Swing/AWT code. NONE of my Swing.invokeLater calls is being invoked during this either. I don't have any custom controls or painting happening. This is the stack trace the debugger shows me when I pause the AWT EventQueue thread.

Thread [AWT-EventQueue-0] (Suspended)   
X11TextRenderer.doDrawGlyphList(long, long, Region, GlyphList) line: not available [native method]  
X11TextRenderer.drawGlyphList(SunGraphics2D, GlyphList) line: 62    
X11TextRenderer(GlyphListPipe).drawChars(SunGraphics2D, char[], int, int, int, int) line: 86    
SunGraphics2D.drawChars(char[], int, int, int, int) line: 2843  
SwingUtilities2.drawChars(JComponent, Graphics, char[], int, int, int, int) line: 780   
Utilities.drawTabbedText(View, Segment, int, int, Graphics, TabExpander, int, int[]) line: 170  
Utilities.drawTabbedText(View, Segment, int, int, Graphics, TabExpander, int) line: 89  
PlainView.drawUnselectedText(Graphics, int, int, int, int) line: 137    
PlainView.drawElement(int, Element, Graphics, int, int) line: 96    
PlainView.drawLine(int, Graphics, int, int) line: 65    
PlainView.paint(Graphics, Shape) line: 288  
BasicTextUI$RootView.paint(Graphics, Shape) line: 1422  
BasicTextAreaUI(BasicTextUI).paintSafely(Graphics) line: 722    
BasicTextAreaUI(BasicTextUI).paint(Graphics, JComponent) line: 869  
BasicTextAreaUI(BasicTextUI).update(Graphics, JComponent) line: 848 
JTextArea(JComponent).paintComponent(Graphics) line: 752    
JTextArea(JComponent).paint(Graphics) line: 1029    
JPanel(JComponent).paintChildren(Graphics) line: 862    
JPanel(JComponent).paint(Graphics) line: 1038   
JPanel(JComponent).paintChildren(Graphics) line: 862    
JPanel(JComponent).paint(Graphics) line: 1038   
JPanel(JComponent).paintChildren(Graphics) line: 862    
JPanel(JComponent).paint(Graphics) line: 1038   
JViewport(JComponent).paintChildren(Graphics) line: 862 
JViewport(JComponent).paint(Graphics) line: 1038    
JViewport.paint(Graphics) line: 747 
JScrollPane(JComponent).paintChildren(Graphics) line: 862   
JScrollPane(JComponent).paint(Graphics) line: 1038  
JPanel(JComponent).paintChildren(Graphics) line: 862    
JPanel(JComponent).paint(Graphics) line: 1038   
JViewport(JComponent).paintChildren(Graphics) line: 862 
JViewport(JComponent).paint(Graphics) line: 1038    
JViewport.paint(Graphics) line: 747 
JScrollPane(JComponent).paintChildren(Graphics) line: 862   
JScrollPane(JComponent).paint(Graphics) line: 1038  
JScrollPane(JComponent).paintToOffscreen(Graphics, int, int, int, int, int, int) line: 5124 
BufferStrategyPaintManager.paint(JComponent, JComponent, Graphics, int, int, int, int) line: 278    
RepaintManager.paint(JComponent, JComponent, Graphics, int, int, int, int) line: 1224   
JScrollPane(JComponent)._paintImmediately(int, int, int, int) line: 5072    
JScrollPane(JComponent).paintImmediately(int, int, int, int) line: 4882 
RepaintManager.paintDirtyRegions(Map<Component,Rectangle>) line: 785    
RepaintManager.paintDirtyRegions() line: 713    
RepaintManager.seqPaintDirtyRegions() line: 693 
SystemEventQueueUtilities$ComponentWorkRequest.run() line: 125  
InvocationEvent.dispatch() line: 209    
EventQueue.dispatchEventImpl(AWTEvent, Object) line: 641    
EventQueue.access$000(EventQueue, AWTEvent, Object) line: 84    
EventQueue$1.run() line: 602    
EventQueue$1.run() line: 600    
AccessController.doPrivileged(PrivilegedAction<T>, AccessControlContext) line: not available [native method]    
AccessControlContext$1.doIntersectionPrivilege(PrivilegedAction<T>, AccessControlContext, AccessControlContext) line: 87    
EventQueue.dispatchEvent(AWTEvent) line: 611    
EventDispatchThread.pumpOneEventForFilters(int) line: 269   
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: 184    
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: 174   
EventDispatchThread.pumpEvents(int, Conditional) line: 169  
EventDispatchThread.pumpEvents(Conditional) line: 161   
EventDispatchThread.run() line: 122 
CasaDelGato
  • 603
  • 7
  • 17
  • 6
    I'm not sure if the question as stated is answerable and sense that we'll need more information. Best would be if you could create and post a very small program that runs and compiles for us, requires no outside resources, and that demonstrates your problem, an [sscce](http://sscce.org), but this will require a bit of effort on your part. Luck. – Hovercraft Full Of Eels Apr 18 '12 at 16:42
  • See also [fibrillation](http://mindprod.com/jgloss/fibrillation.html). – trashgod Apr 19 '12 at 14:04

0 Answers0