Package javax.swing

Examples of javax.swing.JButton.addMouseListener()


      }
    });
    bottomPanel.add(btnDeleteShow);

    JButton btnAddAltTitle = new JButton("Add Alternate Title");
    btnAddAltTitle.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        int row = showTable.getSelectedRow();
        if(row==-1) {
          JOptionPane.showMessageDialog(frame, "Please select a show in the above table first.", "Error", JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here


      }
    });
    bottomPanel.add(btnAddAltTitle);

    JButton btnRemoveAltTitle = new JButton("Remove Alternate Title");
    btnRemoveAltTitle.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        int row = showTable.getSelectedRow();
        if(row==-1) {
          JOptionPane.showMessageDialog(frame, "Please select a show in the above table first.", "Error", JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

    gbc_feedSettingsButtonPanel.gridx = 0;
    gbc_feedSettingsButtonPanel.gridy = 1;
    feedSettingsPanel.add(feedSettingsButtonPanel, gbc_feedSettingsButtonPanel);

    JButton btnAddFeed = new JButton("Add Feed");
    btnAddFeed.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        String inputLabel = JOptionPane.showInputDialog(frame, "Enter the feed name: ");
        String inputURL = JOptionPane.showInputDialog(frame, "Enter the feed URL: ");
        String inputPriority = JOptionPane.showInputDialog(frame, "Enter the feed priority: ");
        try {
View Full Code Here

      }
    });
    feedSettingsButtonPanel.add(btnAddFeed);

    JButton btnDeleteFeed = new JButton("Delete Feed");
    btnDeleteFeed.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        int row = feedTable.getSelectedRow();
        if(row==-1) {
          JOptionPane.showMessageDialog(frame, "Please select a feed in the above table first.", "Error", JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

    gbc_searchettingsButtonPanel.gridx = 0;
    gbc_searchettingsButtonPanel.gridy = 1;
    searchettingsPanel.add(searchettingsButtonPanel, gbc_searchettingsButtonPanel);

    JButton btnaddsearch = new JButton("Add Search");
    btnaddsearch.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        String inputLabel = JOptionPane.showInputDialog(frame, "Enter the search label: ");
        String inputURL = JOptionPane.showInputDialog(frame, "Enter the search URL (use #showtitle# in place of the search string): ");
        try {
          new URL(inputURL);
View Full Code Here

      }
    });
    searchettingsButtonPanel.add(btnaddsearch);

    JButton btnDeletesearch = new JButton("Delete Search");
    btnDeletesearch.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        int row = searchTable.getSelectedRow();
        if(row==-1) {
          JOptionPane.showMessageDialog(frame, "Please select a search url in the above table first.", "Error", JOptionPane.ERROR_MESSAGE);
        }
View Full Code Here

  JPanel  toolpane= new JPanel(new BorderLayout());
  JButton commitb = new JButton(COMMIT_L);
  JButton resetb  = new JButton(RESET_L);

  commitb.addMouseListener(ma);
  resetb.addMouseListener(ma);

  commitb.addActionListener(al);
  resetb.addActionListener(al);

  message = new JLabel("", JLabel.CENTER);
View Full Code Here

        alarmThreshold.setEditable(false);
        leftPanel.add(alarmThreshold).setBounds(5, 130, 110, 20);

        // Alarm Threshold spin up button
        JButton spinUp = new JButton(new ImageIcon("spinup.gif"));
        spinUp.addMouseListener(new MouseAdapter() {

            private javax.swing.Timer spinTimer = new javax.swing.Timer(100, new ActionListener() {

                public void actionPerformed(ActionEvent evt) {
                    updateValue();
View Full Code Here

        });
        leftPanel.add(spinUp).setBounds(115, 130, 20, 10);

        // Alarm threshold spin down button
        JButton spinDown = new JButton(new ImageIcon("spindown.gif"));
        spinDown.addMouseListener(new MouseAdapter() {

            private javax.swing.Timer spinTimer = new javax.swing.Timer(100, new ActionListener() {

                public void actionPerformed(ActionEvent evt) {
                    updateValue();
View Full Code Here

        alarmThreshold.setEditable(false);
        leftPanel.add(alarmThreshold).setBounds(5, 130, 110, 20);

        // Alarm Threshold spin up button
        JButton spinUp = new JButton(new ImageIcon("spinup.gif"));
        spinUp.addMouseListener(new MouseAdapter() {

            private javax.swing.Timer spinTimer = new javax.swing.Timer(100, new ActionListener() {

                public void actionPerformed(ActionEvent evt) {
                    updateValue();
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.