This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JTextArea not appearing in JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea not appearing in JDialog" Watch "JTextArea not appearing in JDialog" New topic
Author

JTextArea not appearing in JDialog

Scott Krasnigor
Greenhorn

Joined: Oct 10, 2005
Posts: 9
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:

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Scott Krasnigor
Greenhorn

Joined: Oct 10, 2005
Posts: 9
Thanks for your prompt response. Works just fine.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTextArea not appearing in JDialog
 
Similar Threads
Dialog Input Question
Turning off Tab traversal in a JTextArea
Maximize button in JDialog
How tp detach a Frame from the Main Application ?
JMF FormatControl Problem