Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JList with submenu  RSS feed

 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I would like to create a sub menu for every list item in a Jlist. I need the UI like avast interface. If we hover over an list item, its sub menu should be shown. I attempted to put an sub menu but didn't work. Is this possible in Swing?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't a clue what the avast interface looks like, but the rest sounds doable. I would try using a javax.swing.Popup or a JWindow for the purpose.

I attempted to put an sub menu but didn't work.

Show us what you tried, in the form of an SSCCE.
 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl

I used your code given here.



In the above code, I replaced the setBackground to new Popup() but when I hovered it didn't popup.

The avast interface is shown in the image

avast.png
[Thumbnail for avast.png]
Avast User Interface
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Partheban Udayakumar wrote:In the above code, I replaced the setBackground to new Popup() but when I hovered it didn't popup.

Check out the API for PopupFactory.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!