Package javax.swing

Examples of javax.swing.JPanel.addMouseListener()


      node.setBorder(BorderFactory.createLineBorder(DEF_NODE_BORDER_COLOR));
      node.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
     
      int startPos = (Integer)buf;
      int finalPos = result.get(buf);
      node.addMouseListener(new NodeMouseAdapter(startPos, finalPos, fbTextComponent));
     
      gbc = new GridBagConstraints(0,i, 1,1, 0,alpha, GridBagConstraints.SOUTH, GridBagConstraints.NONE, new Insets(0,1,0,1), 0,0);
      this.centerPanel.add(node, gbc);
      i++;
    }
View Full Code Here


    // center button
    c = new GridBagConstraints();
    JPanel centerButton = new JPanel();
    centerButton.setToolTipText("Center visible grid");
    centerButton.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        updating = true;
        grid.center();
        updating = false;
View Full Code Here

        gbc.anchor = GridBagConstraints.NORTH;
        gbc.gridwidth = GridBagConstraints.REMAINDER; // end row
        gbLayout.setConstraints(pnl, gbc);

        pnlRight.add(pnl);
        pnl.addMouseListener(new EffectPanelMouseListener(i));
      }

      i++;
    }
    add("West", pnlRight);
View Full Code Here

        frame.getContentPane().add(p);
        frame.pack();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        centerOnScreen(frame);
        frame.setVisible(true);
        p.addMouseListener(new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    update();
                }
            });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.