Solved

Problem with JTree and TextArea ??

Posted on 2001-08-27
7
326 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

730 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