The moose likes Swing / AWT / SWT and the fly likes JTextArea not painting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea not painting" Watch "JTextArea not painting" New topic

JTextArea not painting

Derek Boring
Ranch Hand

Joined: Aug 15, 2006
Posts: 65
I have a JFrame in which i am adding two JTextAreas and a JPanel.
In my JPanel i am drawing some graphics using basic Java drawing functions.
The first TextArea is to act as an output prompt, and the second acts as the input field where i type commands. the program is a simple text based game.

The problem is that the JPanel paints and the graphics inside it show, but both of the textAreas do not paint until i type a command and press enter, or until i highlight text that's already in the compnent. i've already tried calling repaint(), repaintComponent(), and repaintComponents(). none of them seem to work. any help is greatly appreciated. thanks in advance.

Life is 10% what happens and 90% how you react to it.
Attitude is everything.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
can you post the code?
I agree. Here's the link:
subject: JTextArea not painting
It's not a secret anymore!