Glad you found the solution.
Type: Posts; User: Norm
Glad you found the solution.
What happened when you tried what I suggested?
Have you read the API documentation for the setBackground method to see if there is anything there that could help you?
I can not do anything with all those little pieces of code.
Did you see my question? What happens when you do this:
Are you able to set the original color of any of the menuitems BEFORE there is...
Are you able to set the original color of any of the menuitems BEFORE there is any mouse movement?
Try setting the color immediately after the call to setIcon.
You need to make and post a small, complete program that compiles, executes and shows the problem.
Sorry, I do not know anything about the gui menus.
Are you able to set the color of the menus at any time? Not just in a listener.
Sorry, I do not know what the problem is. Can you explain?
Please explain what that means?
When I compile and execute, it shows the trayicon. Then what do I need to do to see the problem?
Here's an attempt. I copied a lot of your code:
/*
Creates a small, transparent window in upper left of screen (60,20) for testing
Creates a TrayIcon with a MouseListener
When the TI is...
Sorry. I think it would be a lot of work and I do not have the time right now.
Try asking your question on this forum: https://coderanch.com/forums
Continued here: ...
Maybe instead of a popup to show the menu, use a dialog.
The problem with the code at that link is that it is just bits and pieces. It is not code that can be copied, compiled and executed for testing.
What is that? Before you were asking about the text inside of the menuitems.
What are you wanting to now? What things are supposed to be right to left?
Sorry, I do not see anything called...
What is Pointer? Where is it used?
Can you use the AWT versions of the components and set the Font to be RTL?
Since you have written your own code for displaying the popup, you need to find a way to get focus or to detect when a click is outside the menuitems.
If you use the old AWT code: ...
But that is not detectable by the program; so then it needs to require a user click on a menu item.
I noticed the same thing: popup menus do not get the focus.
Another solution make be to always hide the popup after any item is selected.
Study the documentation for the Focus system to see how it works:
http://docs.oracle.com/javase/tutorial/uiswing/misc/focus.html...
You may have to took at the how focus works.
An interesting discussion here: https://stackoverflow.com/questions/2421914/showing-hiding-a-jpopupmenu-from-a-jbutton-focuslistener-not-working