I found solution in gui i must first setOpaque(true) and use like this
Info.setOpaque(true);
Open.setOpaque(true);
Exit.setOpaque(true);
Type: Posts; User: cnmeysam
I found solution in gui i must first setOpaque(true) and use like this
Info.setOpaque(true);
Open.setOpaque(true);
Exit.setOpaque(true);
in gui never menu item color change Nowhere and in no way
The program works properly when a new class is created and the code inside the graphic form is placed in that class and the mine section is...
if you use code like this newer can add color to menu
For example in netbeans ( create new project--> create new jframe form and use code like this
go to source and use this inputs first
...
i send small, complete program before
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.imageio.ImageIO;
public class trayform extends javax.swing.JFrame {
it is not about gui menu it is about gui form when i use your code in gui form menu color in system tray dont work
I just want the color to change when the mouse hovers over one, and the color to return to normal when it hovers over it and goes to the next menu.
It works just like when I used this code in the...
It works well in your class when I use mouse input and exit in your code to change the color of the menus, but it does not work when I use the codes in graphically
GUI in the form design menu. I...
I can't found the reason
pleas help
pleas pleas pleas help meeeee
I'm sorry to bother you when i add to your class in
public void loadPopup(JPopupMenu popup) this codes for color menu items when mouse hover Entered or Exited It works properly
...
thanks a lot its work correctly
thanks
Can you write me a sample inside my code?
i think this works for test You just have to replace the path and name of your photos and fonts name in this code
import java.awt.ComponentOrientation;
import java.awt.EventQueue;
import...
sorry it's my fault
Point object is that what i talking about
To align the menus, I have aligned both the pop-ups and the menus right to left
I want the menus inside the pop-up to be right to...
i use pointer like this for popup location
Info.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent evt) {
...
Pointer is used in the codes
Is it possible to make a new pointer and compare these two pointers?
If so how?
something like this
Point point1 = new Point(500, 500);
if (point1 !=...
I think the place where I put the code snippet may be wrong
Since other programs do not have this problem, can we say that this is a bug in Java?
and i use JMenuItem and JPopupMenu not menuitem...
I have no problem hiding pop-ups after clicking on menus
My problem is when I want to click outside the pop-up, that is, when I click on the desktop, the pop-up closes or hide
Even if you can set...
As I have noticed, the JPopupMenu does not focus at all after opening,
i use
popup.setFocusable(true);
popup.grabFocus();
and
popup.addFocusListener(new FocusListener() {
it is from jbutton and don't work for me
popup.addFocusListener(new FocusListener() {
@Override
public void focusLost(FocusEvent e) {
System.out.println("LOST...
i have JPopupMenu and i need when mouse click outside of JPopupMenu my popup is closed
this is my code but focusLost not working
final JPopupMenu popup = new JPopupMenu();
public void...