java - Is it possible to run a JPanel (without JFrame) and display all components inside dynamically? -


so basically, trying jpanel window display components inside dynamically. in other words, re-size window, , display fit content.

i have been able of jframe , pack() method : "causes window sized fit preferred size , layouts of subcomponents". in situation, dont want use jframe because require effort make changes. right now, able make work of jscroll inside wraps text , or new lines, window size more static. jpanel extending topcomponent , able display with:

jpanel.open();   jpanel.requestactive(); 

so question how resize window fit content upon actions in window.

the jpanel has added window in order make sense. suggest use layout managers correctly , decent user interface.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -