Solved

Problem with JTree and TextArea ??

Posted on 2001-08-27
7
324 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

777 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