Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTextPane is not showing the messages when the window is in Iconified state

 
Jaheer Abbas Syed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when the JFrame(window) is in Iconified state and when i try to add text to JTextPane using setText().it is added to the JTextPane but it is not showing the message when i maximize the window.if the window(JFrame) is in maximized state(DeIconified state) and i try to add text then the message is added and visible in JTextPane.

How can i make the JTextPane show the messages when it is minimized.
please help me out....
thank you...

Here is my Code.



[MG Added code tags]
[ November 19, 2008: Message edited by: Maneesh Godbole ]
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jaheer,

In future, while posting code snippets, please do use code tags. I have added them for you this time. As you can see it makes the code more readable and easier to understand.

Have you added all your child components to the parent before calling the setVisible() on the frame? Most of the times, that is the cause of the problem you are describing.
 
Jaheer Abbas Syed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maneesh,

i have added the child components to the JFrame before calling setVisible().
this is my complete code.one thing is the following code is working in Eclipse but not in NetBeans why.run this code and set the message when the Chat Client is in Iconified(Minimized) state and DeIconify(Maximize) the ChatClient Window and see the message.Message is not displayed and if you select the area in JTextPane with mouse then the message is displaying.

This is the code for calling ClientMain1


This is the code of ClientMain1

 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Use One Thread Per Question. This is basically the same problem as this one. I've closed that one since this has more information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic