• 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 painting

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you post the code?
reply
    Bookmark Topic Watch Topic
  • New Topic