Solved

Problem with JTree and TextArea ??

Posted on 2001-08-27
7
323 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

861 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

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now