banner



How To Change Background Color Of Netbeans Mac

Best Java code snippets using javax.swing.JButton.setBackground (Showing top twenty results out of 1,233)

Refine searchRefine arrow

                                                                                                                                                                JButton button =                                                                                    new                                                                                                                                                  JButton                                                              ();                                                                                                                                            push button.                                                              setBackground                                                              (Color.ruby-red);                                                                                                                                            button.setOpaque(                                                              true                                                              );                                                                                                                                            button.setBorderPainted(                                                              false                                                              );                                                                            
                                                                                                                                              individual                                                                                      JButton createButton(Lecture lecture, Color color, String toolTip) {                                                                                                                                                                    JButton push = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      LectureAction(lecture)));                                                                                                                                                                    button.                                                              setBackground                                                              (colour);                                                                                                                                                                                                                                if                                                                                      (lecture.isPinned()) {                                                                                                                      button.setIcon(CommonIcons.PINNED_ICON);                                                                            }                                                                            button.setToolTipText(toolTip);                                                                                                                                                                                      render                                                                                      push button;                                                                                                  }                                                                                          
                                                                                                                                              individual                                                                                      JButton createButton(MeetingAssignment meetingAssignment, Color color) {                                                                                                                                                                    JButton push button = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      MeetingAssignmentAction(meetingAssignment)));                                                                                                                                                                    button.                                                              setBackground                                                              (color);                                                                                                                                                                                                                                render                                                                                      push button;                                                                                                  }                                                                                          
                                                                                                                                              individual                                                                                      JButton createButton(Exam exam, Color color, Cord toolTip) {                                                                                                                                                                    JButton button = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      ExamAction(exam)));                                                                                                                                                                    push button.                                                              setBackground                                                              (color);                                                                                                                      button.setToolTipText(toolTip);                                                                                                                                                                                      if                                                                                      (test                                                                                    instanceof                                                                                      FollowingExam) {                                                                                                                      push button.setForeground(TangoColorFactory.ALUMINIUM_5);                                                                            }                                                                                                                                                                                      render                                                                                      button;                                                                                                  }                                                                                          
                                                                                                                                              private                                                                                      JButton createButton(TeamAssignment teamAssignment, Color color) {                                                                                                                                                                    JButton push = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      TeamAssignmentAction(teamAssignment)));                                                                                                                                                                    button.                                                              setBackground                                                              (color);                                                                                                                                                                                                                                if                                                                                      (teamAssignment.isPinned()) {                                                                                                                      push button.setIcon(CommonIcons.PINNED_ICON);                                                                            }                                                                                                                                                                                      return                                                                                      push;                                                                                                  }                                                                                          
                                                                                                                                              private                                                                                      JButton createButton(Lucifer match, Team squad, Team otherTeam, String toolTip) {                                                                                                                      Color color = determinePlanningEntityColor(match, otherTeam);                                                                            String label = otherTeam.getLabel();                                                                                                                          JButton button = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      MatchAction(match, characterization)));                                                                                                                                                                                                                                if                                                                                      (match.getAwayTeam() == team) {                                                                                                                      push button.setIcon(awayMatchIcon);                                                                            }                                                                                                                          button.                                                              setBackground                                                              (color);                                                                                                                      button.setToolTipText(toolTip);                                                                                                                                                                                      return                                                                                      push;                                                                                                  }                                                                                          
                                                                                                                                              public                                                                                                                                                  void                                                                                      addShiftAssignment(ShiftAssignment shiftAssignment) {                                                                                                                      Shift shift = shiftAssignment.getShift();                                                                            JPanel shiftPanel = shiftPanelMap.get(shift);                                                                                                                          JButton shiftAssignmentButton = SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      ShiftAssignmentAction(shiftAssignment)));                                                                                                                      shiftAssignmentButton.setEnabled(shiftPanel.isEnabled());                                                                                                                                                                                      if                                                                                      (employee != nix) {                                                                                                                                                                                                                                if                                                                                      (employee.getDayOffRequestMap().containsKey(shift.getShiftDate())                                                                                                                      || employee.getShiftOffRequestMap().containsKey(shift)) {                                                                            shiftAssignmentButton.setForeground(TangoColorFactory.SCARLET_1);                                                                            }                                                                            }                                                                            Color color = nurseRosteringPanel.determinePlanningEntityColor(shiftAssignment, shift.getShiftType());                                                                                                                          shiftAssignmentButton.                                                              setBackground                                                              (colour);                                                                                                                      String toolTip = nurseRosteringPanel.determinePlanningEntityTooltip(shiftAssignment);                                                                            shiftAssignmentButton.setToolTipText(toolTip);                                                                            shiftPanel.add(shiftAssignmentButton);                                                                            shiftPanel.repaint();                                                                            shiftAssignmentButtonMap.put(shiftAssignment, shiftAssignmentButton);                                                        }                                                                                          
                                                                                                                                              private                                                                                      JButton createTaskButton(Chore job) {                                                                                                                                                                    JButton taskButton =  SwingUtils.makeSmallButton(                                                              new                                                                                                                                                  JButton                                                              (                                                              new                                                                                      TaskAction(task)));                                                                                                                                                                    taskButton.                                                              setBackground                                                              (task.isPinned() ? TangoColorFactory.ALUMINIUM_3 : TangoColorFactory.ALUMINIUM_1);                                                                                                                      taskButton.setHorizontalTextPosition(SwingConstants.CENTER);                                                                            taskButton.setVerticalTextPosition(SwingConstants.TOP);                                                                            taskButton.setSize(task.getDuration(), ROW_HEIGHT);                                                                                                                                                                                      return                                                                                      taskButton;                                                                                                  }                                                                                          
                                                                                                                                                                colorPickerBtn =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "Pick a color"                                                              );                                                                                                                                                                                                                            colorPickerBtn =                                                                                    new                                                                                                                                                  JButton                                                              (ColorUtil.toHexColor(existingColor).toUpperCase());                                                                                                                                                                                                                            colorPickerBtn.                                                              setBackground                                                              (existingColor);                                                                                                                                                                    colorPickerBtn.addMouseListener(                                                              new                                                                                      MouseAdapter()                                                                                                                                                                                                    JButton resetButton =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "Reset"                                                              );                                                                                                  resetButton.addActionListener((due east) ->                                                                                          
                                                                                                                                                                                                                            private                                                                                                                                                  static                                                                                      JButton createSimpleButton(String text) {                                                                                                                                                                    JButton push button =                                                                                    new                                                                                                                                                  JButton                                                              (text);                                                                                                                      button.setForeground(Colour.Black);                                                                                                                          button.                                                              setBackground                                                              (Colour.WHITE);                                                                                                                                                                    Border line =                                                                                    new                                                                                      LineBorder(Color.Blackness);                                                                                                                                                                    Border margin =                                                                                    new                                                                                      EmptyBorder(                                                              5                                                              ,                                                                                    15                                                              ,                                                                                    five                                                              ,                                                                                    15                                                              );                                                                                                                                                                    Border compound =                                                                                    new                                                                                      CompoundBorder(line, margin);                                                                                                                      push.setBorder(compound);                                                                                                                                                                                      render                                                                                      button;                                                                                                  }                                  
                                                                                                                                                                                                                            for                                                              (                                                              int                                                                                      i=                                                              i                                                              ;i<=                                                              9                                                              ;i++)                                                                                                  {                                                                                                                          JButton btn =                                                                                    new                                                                                                                                                  JButton                                                              (String.valueOf(i));                                                                                                                                                                    btn.                                                              setBackground                                                              (Color.Blackness);                                                                                                                      btn.setForeground(Color.Greyness);                                                                            p3.add(btn);                                                        }                                  
                                                                                                                                        lastLine.setBorder(BorderFactory.createEmptyBorder(                                                              v                                                              ,                                                                                    five                                                              ,                                                                                    5                                                              ,                                                                                    5                                                              ));                                                                                                                                                                                                                                                                  this                                                              .buttonClose =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "Close"                                                              );                                                                                                                                                                                                          this                                                              .buttonClose.setBorder(BorderFactory.createCompoundBorder(                                                                                                                      HelperUi.BORDER_FOCUS_GAINED,                                                                                                                                                          Container dialogPane =                                                                                    this                                                              .getContentPane();                                                                                                                                                                                                                                                                  final                                                                                      JButton buttonWebpage =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "Webpage"                                                              );                                                                                                  buttonWebpage.setBorder(BorderFactory.createCompoundBorder(                                                                            HelperUi.BORDER_FOCUS_GAINED,                                                                                                                                                          buttonWebpage.                                                              setBackground                                                              (                                                              new                                                                                      Colour(                                                              200                                                              ,                                                                                    221                                                              ,                                                                                    242                                                              ));                                                                                                                                                                                                                                                                  this                                                              .buttonClose.                                                              setBackground                                                              (                                                              new                                                                                      Color(                                                              200                                                              ,                                                                                    221                                                              ,                                                                                    242                                                              ));                                                                                                                                    
                                                                                                                                              public                                                                                                                                                  static                                                                                      JXPanel getDescription(CardView card,                                                                                    int                                                                                      width,                                                                                    int                                                                                      peak) {                                                                                                                                                                    JXPanel descriptionPanel =                                                                                    new                                                                                      JXPanel();                                                                                                                                                                                                                                                                                                                                                                                                                                                                                descriptionPanel.setBounds(                                                              0                                                              ,                                                                                    0                                                              , width, height);                                                                                                                                                                    descriptionPanel.setVisible(                                                              false                                                              );                                                                                                                      descriptionPanel.setLayout(null);                                                                                                                                                                                                                                                                                                                                                                                                                                      JButton j =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              ""                                                              );                                                                                                                                                                    j.setBounds(                                                              0                                                              ,                                                                                    0                                                              , width, meridian);                                                                                                                                                                    j.                                                              setBackground                                                              (Color.black);                                                                                                                      j.setLayout(null);                                                                                                                                                                                  JLabel cardText =                                                                                    new                                                                                      JLabel();                                                                                                                                                                    cardText.setBounds(                                                              five                                                              ,                                                                                    five                                                              , width -                                                                                    10                                                              , superlative -                                                                                    10                                                              );                                                                                                                      cardText.setForeground(Color.white);                                                                            cardText.setFont(cardNameFont);                                                                            cardText.setVerticalAlignment(SwingConstants.Top);                                                                            j.add(cardText);                                                                                                                                    TextLines textLines = GuiDisplayUtil.getTextLinesfromCardView(menu);                                                                            cardText.setText(getRulefromCardView(card, textLines).toString());                                                                                                                                    descriptionPanel.add(j);                                                                                                                                                                                                                                              return                                                                                      descriptionPanel;                                                                                                  }                                                                                          
                                                                                                                                        buttonPanel.setLayout(                                                              new                                                                                      BoxLayout(buttonPanel, BoxLayout.X_AXIS));                                                                                                                                                                                                    JButton buttonCollect =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "collect"                                                              );                                                                                                                                            buttonCollect.setPreferredSize(                                                              new                                                                                      Dimension(                                                              100                                                              ,                                                                                    thirty                                                              ));                                                                                                                                            buttonCollect.setEnabled(                                                              simulated                                                              );                                                                                                                                                                                                    buttonBase =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "base"                                                              );                                                                                                                                            buttonBase.setPreferredSize(                                                              new                                                                                      Dimension(                                                              100                                                              ,                                                                                    30                                                              ));                                                                                                                                            buttonBase.setEnabled(                                                              true                                                              );                                                                                                                                                                                                    buttonTrain =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "railroad train"                                                              );                                                                                                                                            buttonTrain.setPreferredSize(                                                              new                                                                                      Dimension(                                                              100                                                              ,                                                                                    30                                                              ));                                                                                                                                            buttonTrain.setEnabled(                                                              false                                                              );                                                                                                                                            buttonTrain.                                                              setBackground                                                              (Colour.cyan.darker());                                                                                                                                                                                                    buttonRecord.setPreferredSize(                                                              new                                                                                      Dimension(                                                              100                                                              ,                                                                                    30                                                              ));                                                                                                                                            buttonRecord.setEnabled(                                                              truthful                                                              );                                                                                                                                            buttonRecord.                                                              setBackground                                                              (                                                              new                                                                                      Color(                                                              60                                                              ,                                                                                    255                                                              ,                                                                                    120                                                              ));                                                                                                                                    
                                                                                                                  JButton button1 = MakeGameButton(...);                                                        JButton button2 = MakeGameButton(...);                                                                                                                                                          JButton buttonA =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "A Push button"                                                              );                                                                                                                                                                                                    buttonA.addActionListener(                                                              new                                                                                      ActionListener(){                                                                                                                                                                                                                                public                                                                                                                                                  void                                                                                      actionPerformed(ActionEvent e){                                                                                                                                                                    button1.                                                              setBackground                                                              (...);                                                                                                                      }                                                        });                                  
                                                                                                                                                                                                                            public                                                                                                                                                  class                                                                                      Jbutton {                                                                                                                                                                                                                                public                                                                                                                                                  static                                                                                                                                                  void                                                                                      main (String[] args){                                                                                                                                                                                                                                                                                                                                                                                                                        JButton button =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "I'g colorful!"                                                              );                                                                                                                                                                    push.                                                              setBackground                                                              (Color.Carmine);                                                                                                                      }                                                        }                                  
                                                                                                                                                                                                                            private                                                                                      newButton(String label, Color background) {                                                                                                                                                                    JButton button =                                                                                    new                                                                                                                                                  JButton                                                              (characterization);                                                                                                                                                                    button.                                                              setBackground                                                              (groundwork);                                                                                                                                                                                                                                return                                                                                      push;                                                                                                  }                                  
                                                                                                                                                                JButton b =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "foo"                                                              );                                                                                                                                            b.addMouseListener(                                                              new                                                                                      MouseAdapter(){                                                                                                                                                                              @Override                                                                                                                                                                                      public                                                                                                                                                  void                                                                                      mousePressed(MouseEvent e) {                                                                                                                                                                    b.                                                              setBackground                                                              (Colour.red);                                                                                                                      }                                                                                                                                    @Override                                                                                                                                                                                      public                                                                                                                                                  void                                                                                      mouseReleased(MouseEvent eastward) {                                                                                                                                                                                                                                                                                                                                                                          }                                                                                                                });                                  
                                                                                                                                                                                                                            for                                                                                      (                                                              int                                                                                      i =                                                                                    0                                                              ; i <                                                                                    20                                                              ; i++) {                                                                                                                                                                                                                                final                                                                                      JButton btnBookFlight =                                                                                    new                                                                                                                                                  JButton                                                              (                                                              "Book"                                                                                      + i);                                                                                                                                                                    btnBookFlight.addActionListener(                                                              new                                                                                      ActionListener() {                                                                                                                                                                                                                                public                                                                                                                                                  void                                                                                      actionPerformed(ActionEvent arg0) {                                                                                                                                                                    btnBookFlight.                                                              setBackground                                                              (Colour.Reddish);                                                                                                                      ...                                                                            }                                                                            });                                                        }                                  

How To Change Background Color Of Netbeans Mac,

Source: https://www.tabnine.com/code/java/methods/javax.swing.JButton/setBackground

Posted by: scottworsoll.blogspot.com

0 Response to "How To Change Background Color Of Netbeans Mac"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel