Solved

Problem with JTree and TextArea ??

Posted on 2001-08-27
7
322 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
Comment Utility
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_
Comment Utility
>  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
Comment Utility
Hello Mr HeyHey

Thanks for your reply, i have used JTextArea instead of TextArea but it doesn't work also !!!
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 16

Expert Comment

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

Expert Comment

by:objects
Comment Utility
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
Comment Utility
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
Comment Utility
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
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 …
This video teaches viewers about errors in exception handling.

771 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

12 Experts available now in Live!

Get 1:1 Help Now