Package javax.swing

Examples of javax.swing.JLabel.addMouseListener()


        final TextField bean = new TextField();

        final StringScalarBox scalarBox = new StringScalarBox();
        panel.add(bean, BorderLayout.CENTER);
        final JLabel focusLabel = new JLabel("grab Focus");
        focusLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                focusLabel.grabFocus();
            }
        });
View Full Code Here


        final TextField bean = new TextField();

        final StringScalarBox scalarBox = new StringScalarBox();
        panel.add(bean, BorderLayout.CENTER);
        final JLabel focusLabel = new JLabel("grab Focus");
        focusLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                focusLabel.grabFocus();
            }
        });
View Full Code Here

        final TextField bean = new TextField();

        final StringScalarBox scalarBox = new StringScalarBox();
        panel.add(bean, BorderLayout.CENTER);
        final JLabel focusLabel = new JLabel("grab Focus");
        focusLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                focusLabel.grabFocus();
            }
        });
View Full Code Here

        final TextField bean = new TextField();

        final StringScalarBox scalarBox = new StringScalarBox();
        panel.add(bean, BorderLayout.CENTER);
        final JLabel focusLabel = new JLabel("grab Focus");
        focusLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                focusLabel.grabFocus();
            }
        });
View Full Code Here

            final JLabel cell = new JLabel(kana.getUnicodeString(), JLabel.CENTER);
            cell.setFont(Fonts.kanaMedium());
            cell.setBorder(BorderFactory.createEtchedBorder());
            cell.setAlignmentX(0.5f);
            cell.setAlignmentY(0.5f);
            cell.addMouseListener(new MouseAdapter() {
                final Border border = cell.getBorder();
                @Override
                public void mousePressed(MouseEvent mouseEvent) {
                    if (mouseEvent.getButton() == MouseEvent.BUTTON1) {
                        if (!kana.matches(tiles.kana)) {
View Full Code Here

        final JLabel syllabaryLabel = new JLabel();
        syllabaryLabel.setIcon(Resources.ICON_KEYBOARD);
        syllabaryLabel.setIconTextGap(0);
        syllabaryLabel.setToolTipText("Click to Display Syllabary");
        syllabaryLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent mouseEvent) {
                syllabaryDialog.setVisible(!syllabaryDialog.isVisible());
                if (syllabaryDialog.isVisible()) {
                    syllabaryLabel.setToolTipText("Click to Hide Syllabary");
View Full Code Here

        kanalyzerDialog.pack();

        final JLabel kanalyzerLabel = new JLabel();
        kanalyzerLabel.setIcon(Resources.ICON_CHART_BAR);
        kanalyzerLabel.setToolTipText("Click to Display Kanalyzer");
        kanalyzerLabel.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent mouseEvent) {
                if (kanalyzerLabel.isEnabled()) {
                    kanalyzerDialog.setVisible(!kanalyzerDialog.isVisible());
                    if (kanalyzerDialog.isVisible()) {
View Full Code Here

    final JLabel about = new JLabel();
    about.setText("About ");
    // about.setHorizontalTextPosition(JLabel.RIGHT);
    about.setHorizontalAlignment(JLabel.RIGHT);

    about.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent arg0) {
        JOptionPane
            .showMessageDialog(about,
                "Version "+version
                +"\nLicensed under GPL, sounds under CC sampling.\n"+
View Full Code Here

        final JLabel h = new JLabel(getAboutURL());
        h.setForeground(Color.blue);
        h.setFont(new Font(h.getFont().getName(), Font.BOLD, 10));
        h.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        h.addMouseListener(new MouseAdapter() {
                public void mouseClicked(MouseEvent evt) {
                    try {
                        BrowserLauncher.openURL(getAboutURL());
                    } catch (IOException ioe) {
                        ioe.printStackTrace();
View Full Code Here

      for (final Link l : links) {
        JLabel label = new JLabel(l.getLinkName() + " "
            + l.getLinkAddress() + " @ " + l.getProtocolHost()
            + ":" + l.getProtocolPort());
        label.setBorder(BorderFactory.createLineBorder(Color.BLACK));
        label.addMouseListener(new MouseListener() {

          @Override
          public void mouseReleased(MouseEvent e) {
            // TODO Auto-generated method stub
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.