• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JTextArea not appearing in JDialog

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple JDialog that gets envoked on a certain event. It contains a JScrollArea with a JTextArea attached. When my Dialog is displayed, the text area is not visible. Any assistance would be appreciated.the code is below:

 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remove this line:

This causes the scroll pane's viewport to not be shown unless you specify the bounds.

Please note that it's an overall bad idea to use null as layout managers; your code just shows one of the reasons.

Also, if I were you I'd call setResizable(false) on your dialog if you're keeping this setup, because the controls stay in their old place if you resize the dialog.
 
Scott Krasnigor
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your prompt response. Works just fine.
 
reply
    Bookmark Topic Watch Topic
  • New Topic