Search:

Type: Posts; User: cnmeysam

Search: Search took 0.13 seconds.

  1. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    I found solution in gui i must first setOpaque(true) and use like this


    Info.setOpaque(true);
    Open.setOpaque(true);
    Exit.setOpaque(true);
  2. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  3. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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



    ...
  4. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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 {
  5. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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
  6. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  7. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  8. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    I can't found the reason
    pleas help
  9. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    pleas pleas pleas help meeeee
  10. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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

    ...
  11. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    thanks a lot its work correctly
  12. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    thanks
  13. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    Can you write me a sample inside my code?
  14. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  15. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  16. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    i use pointer like this for popup location



    Info.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseEntered(java.awt.event.MouseEvent evt) {
    ...
  17. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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 !=...
  18. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  19. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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...
  20. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    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() {
  21. Replies
    42
    Views
    7,863

    [SOLVED] Re: close JPopupMenu after focus lost

    it is from jbutton and don't work for me



    popup.addFocusListener(new FocusListener() {
    @Override
    public void focusLost(FocusEvent e) {
    System.out.println("LOST...
  22. Replies
    42
    Views
    7,863

    [SOLVED] close JPopupMenu after focus 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...
Results 1 to 22 of 22