Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Java Swing Layouts

Tags:

java

layout

swing

There is one method which prints layout information for particulat components. I knew one method is there but I forgot the name.

When you call that method for Swing component it displays layout information in detail for that component just like dumpstacktrace call.

Any idea? What is that method name? I read it in one book but forgot it. Or let me know some good ways to debug Java Swing layout.

like image 790
Umesh K Avatar asked Jul 12 '11 20:07

Umesh K


1 Answers

When your JFrame is visible press CTRL+SHIFT+F1 and see the console output for the tree hierarchy of components and layouts.

like image 165
StanislavL Avatar answered Oct 07 '22 12:10

StanislavL