aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTextPane is not showing the messages when the window is in Iconified state Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextPane is not showing the messages when the window is in Iconified state" Watch "JTextPane is not showing the messages when the window is in Iconified state" New topic
Author

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

Jaheer Abbas Syed
Greenhorn

Joined: Nov 17, 2008
Posts: 3
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

Joined: Jul 26, 2007
Posts: 10523
    
    9

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jaheer Abbas Syed
Greenhorn

Joined: Nov 17, 2008
Posts: 3
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

Joined: Oct 27, 2005
Posts: 19762
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JTextPane is not showing the messages when the window is in Iconified state