Solved

Problem with JTree and TextArea ??

Posted on 2001-08-27
7
327 Views
Last Modified: 2012-05-04
Hello to all,

I have created an application containing a JTree and a Text Area. I have included popup menu in JTree i.e. by right clicking on any leaf of JTree a popup menu appears having two options
1) Start Display
2) Stop Display
But the problem is that, popup menu is only displayed when TextArea is not visible in frame and as soon as i expand or maximize the frame the right click stop responding, or in other words popup menu does not works.
Can any body tell me whats the problem ???
0
Comment
Question by:mzkhan786
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6427978
Which component have you added the mouse listener to that pops up your menu?  Sounds like when you expand your window the mouse is no longer over your (mouse listener) component.
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 6428775
>  when TextArea is not visible in frame

use JTextArea instead of TextArea. TextArea is heavyweight component and will 'hide' all the Swing components.
0
 

Author Comment

by:mzkhan786
ID: 6430889
Hello Mr HeyHey

Thanks for your reply, i have used JTextArea instead of TextArea but it doesn't work also !!!
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 16

Expert Comment

by:heyhey_
ID: 6430943
we cannot help you without sample code that reproduces the problem (full, compilable example please)
0
 
LVL 92

Expert Comment

by:objects
ID: 6431270
I reckon it's a layout issue, and when you resize your mouse listener is not growing with your frame.
0
 
LVL 5

Expert Comment

by:vemul
ID: 7773590
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- To be PAQ'ed and points NOT refunded

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7861627
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question