Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

editable popup menu  RSS feed

 
Tai Yo
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to ask can I edit jTextField text from ToolTip window (textarea window), i.e. to make editable tooltip or popup menu.
I couldn't find from Google reliable answer or I am searching with wrong keywords.

Will be very grateful for any help.
 
Knute Snortum
Sheriff
Posts: 3553
86
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's move this to the Swing forum.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I googled for JToolTip and one of the first suggestions I got back was this Ranch thread from several years ago: Customizing JToolTip. It looks like it might well be the sort of thing you're looking for.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tai Yo wrote:I would like to ask can I edit jTextField text from ToolTip window (textarea window), i.e. to make editable tooltip or popup menu.
I couldn't find from Google reliable answer or I am searching with wrong keywords.


I find your requirement very strange. Tool tips are meant to deliver 'addition information' (e.g. Click this button to login to the application) and popups are meant to be contextual menus, depending on the current state (e.g. After selecting some table rows, the popup will provide a control to say delete them)

So why do you want to edit? If you explain what exactly you are trying to achieve, we might be able to provide better suggestions
 
Tai Yo
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jPanel and jTextField1 with width 20. Then user type some free long text to jTextField1. So some part of text will be hiden because of width 20.
The purpose I want to achieve is: when user move the cursor to jTextField1, some window must appear with full text (same as JToolTip) and after clicking this window we can be able to edit the jTextField1 text.
Is it possible to realize?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the entered text is too long, you can considering using a JTextArea instead.
IMO it does not make sense to have yet another edit control when the user is already using the JTextField. You can always have the tooltip return the current text. However, keep in mind the usual way the tool tip appears is when the user mouse overs the control.
 
Tai Yo
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your answers.
Will try to realize it, by considering Paul Clapham's suggested link.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!