javax.swing.JButton.setBorderPainted()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中javax.swing.JButton.setBorderPainted()方法的一些代码示例,展示了JButton.setBorderPainted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JButton.setBorderPainted()方法的具体详情如下:
包路径:javax.swing.JButton
类名称:JButton
方法名:setBorderPainted

JButton.setBorderPainted介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

public ProgressPanel(final MainWindow mainWindow, boolean showCancelButton) {
  progressLabel = new JLabel();
  progressBar = new JProgressBar(0, 100);
  progressBar.setIndeterminate(true);
  progressBar.setStringPainted(false);
  progressLabel.setLabelFor(progressBar);
  setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
  setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
  setVisible(false);
  add(progressLabel);
  add(progressBar);
  if (showCancelButton) {
    JButton cancelButton = new JButton(ICON_CANCEL);
    cancelButton.setPreferredSize(new Dimension(ICON_CANCEL.getIconWidth(), ICON_CANCEL.getIconHeight()));
    cancelButton.setToolTipText("Cancel background jobs");
    cancelButton.setBorderPainted(false);
    cancelButton.setFocusPainted(false);
    cancelButton.setContentAreaFilled(false);
    cancelButton.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        mainWindow.cancelBackgroundJobs();
      }
    });
    add(cancelButton);
  }
}

代码示例来源:origin: stackoverflow.com

JButton button = new JButton();
button.setBackground(Color.red);
button.setOpaque(true);
button.setBorderPainted(false);

代码示例来源:origin: skylot/jadx

button.setFocusable(false);
button.setBorder(null);
button.setBorderPainted(false);
button.addActionListener(e -> closeCodePanel(contentPanel));

代码示例来源:origin: skylot/jadx

prevButton.setBorderPainted(false);
add(prevButton);
nextButton.setBorderPainted(false);
add(nextButton);
closeButton.setIcon(ICON_CLOSE);
closeButton.addActionListener(l -> toggle());
closeButton.setBorderPainted(false);
add(closeButton);

代码示例来源:origin: bonnyfone/vectalign

btnMorphAnimation = new JButton(icnPlay);
btnMorphAnimation.setPreferredSize(new Dimension(35, 35));
btnMorphAnimation.setBorderPainted(false);
btnMorphAnimation.setBorder(null);
btnMorphAnimation.setMargin(new Insets(0, 0, 0, 0));

代码示例来源:origin: redwarp/9-Patch-Resizer

this.xhdpiButton.setBorderPainted(false);
this.xhdpiButton.setFocusPainted(false);
this.xhdpiButton.setVerticalTextPosition(SwingConstants.BOTTOM);

代码示例来源:origin: runelite/runelite

clearButton.setForeground(ColorScheme.PROGRESS_ERROR_COLOR);
clearButton.setBorder(null);
clearButton.setBorderPainted(false);
clearButton.setContentAreaFilled(false);
clearButton.setVisible(false);

代码示例来源:origin: tomighty/tomighty

@Override
public void installUI(JComponent component) {
  super.installUI(component);
  JButton button = (JButton)component;
  button.setBorderPainted(false);
}

代码示例来源:origin: tomighty/tomighty

@Override
public void installUI(JComponent component) {
  super.installUI(component);
  JButton button = (JButton)component;
  button.setBorderPainted(false);
}

代码示例来源:origin: stackoverflow.com

JButton button = new JButton();
button.setBorderPainted(false);
button.setBorder(null);
//button.setFocusable(false);
button.setMargin(new Insets(0, 0, 0, 0));
button.setContentAreaFilled(false);
button.setIcon(myIcon1);
button.setRolloverIcon(myIcon2);
button.setPressedIcon(myIcon3);
button.setDisabledIcon(myIcon4);

代码示例来源:origin: geotools/geotools

btn.setBorderPainted(false);
btn.addActionListener(
    new ActionListener() {

代码示例来源:origin: tomighty/tomighty

@Override
public void installUI(JComponent component) {
  super.installUI(component);
  JButton button = (JButton)component;
  button.setSize(new Dimension(17, 16));
  button.setOpaque(false);
  button.setBorderPainted(false);
}

代码示例来源:origin: nodebox/nodebox

public ProgressPanel(final NodeBoxDocument document) {
  setMinimumSize(new Dimension(0, PROGRESS_PANEL_HEIGHT));
  setMaximumSize(new Dimension(PROGRESS_PANEL_WIDTH, PROGRESS_PANEL_HEIGHT));
  setPreferredSize(new Dimension(PROGRESS_PANEL_WIDTH, PROGRESS_PANEL_HEIGHT));
  setLayout(new FlowLayout(FlowLayout.LEADING, 0, 0));
  stopButton = new JButton(stopOffIcon);
  stopButton.setBorderPainted(false);
  stopButton.setBorder(null);
  stopButton.setSize(19, 19);
  stopButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      document.stopRendering();
    }
  });
  add(stopButton);
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

/**
 * Creates a small 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel
 *
 * @return JButton with close icons.
 */
public static JButton createCloseButton() {
  JButton closeButton = new JButton();
  int size = 16;
  closeButton.setPreferredSize(new Dimension(size, size));
  closeButton.setContentAreaFilled(false);
  closeButton.setFocusable(false);
  closeButton.setBorder(BorderFactory.createEmptyBorder());
  closeButton.setBorderPainted(false);
  closeButton.setRolloverEnabled(true);
  closeButton.setIcon(ImageUtilities.image2Icon(getCloseTabImage()));
  closeButton.setRolloverIcon(ImageUtilities.image2Icon(getCloseTabRolloverImage()));
  closeButton.setPressedIcon(ImageUtilities.image2Icon(getCloseTabPressedImage()));
  return closeButton;
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

/**
 * Creates a big 'close' JButton with close icon, rollover icon and pressed icon according to Look and Feel
 *
 * @return JButton with close icons.
 */
public static JButton createBigCloseButton() {
  JButton closeButton = new JButton();
  int size = 19;
  closeButton.setPreferredSize(new Dimension(size, size));
  closeButton.setContentAreaFilled(false);
  closeButton.setFocusable(false);
  closeButton.setBorder(BorderFactory.createEmptyBorder());
  closeButton.setBorderPainted(false);
  closeButton.setRolloverEnabled(true);
  closeButton.setIcon(ImageUtilities.image2Icon(getBigCloseTabImage()));
  closeButton.setRolloverIcon(ImageUtilities.image2Icon(getBigCloseTabRolloverImage()));
  closeButton.setPressedIcon(ImageUtilities.image2Icon(getBigCloseTabPressedImage()));
  return closeButton;
}

代码示例来源:origin: org.netbeans.api/org-openide-awt

bBack.setBorderPainted(false);
bBack.setContentAreaFilled(false);
bBack.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/back_normal.png", true)); //NOI18N
bForward.setBorderPainted(false);
bForward.setContentAreaFilled(false);
bForward.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/forward_normal.png", true)); //NOI18N
bReload.setBorderPainted(false);
bReload.setContentAreaFilled(false);
bReload.setIcon(ImageUtilities.loadImageIcon("org/openide/resources/html/refresh.png", true)); //NOI18N
bStop.setBorderPainted(false);
bStop.setBorder(BorderFactory.createEmptyBorder());
bStop.setContentAreaFilled(false);

代码示例来源:origin: ron190/jsql-injection

labelIsCheckingUpdate.setBorderPainted(false);
labelIsCheckingUpdate.setContentAreaFilled(false);
labelIsReportingBugs.setBorderPainted(false);
labelIsReportingBugs.setContentAreaFilled(false);
labelIsEvading.setBorderPainted(false);
labelIsEvading.setContentAreaFilled(false);
labelIsFollowingRedirection.setBorderPainted(false);
labelIsFollowingRedirection.setContentAreaFilled(false);
labelTestConnection.setBorderPainted(false);
labelTestConnection.setContentAreaFilled(false);
labelParseForm.setBorderPainted(false);
labelParseForm.setContentAreaFilled(false);
buttonIsUsingProxy.setBorderPainted(false);
buttonIsUsingProxy.setContentAreaFilled(false);
buttonIsUsingProxyHttps.setBorderPainted(false);
buttonIsUsingProxyHttps.setContentAreaFilled(false);
labelUseDigestAuthentication.setBorderPainted(false);
labelUseDigestAuthentication.setContentAreaFilled(false);
labelUseKerberos.setBorderPainted(false);
labelUseKerberos.setContentAreaFilled(false);

代码示例来源:origin: ron190/jsql-injection

PANEL_HIDDEN_CONSOLES.setMaximumSize(new Dimension(17, 22));
JButton buttonShowConsoles = new BasicArrowButton(SwingConstants.NORTH);
buttonShowConsoles.setBorderPainted(false);
buttonShowConsoles.setOpaque(false);

代码示例来源:origin: pentaho/mondrian

getResourceConverter().getString(
    "workbench.toolbar.new", "New"));
toolbarNewButton.setBorderPainted(false);
toolbarNewButton.addActionListener(
  new ActionListener() {
  getResourceConverter().getString(
    "workbench.toolbar.newArrow", "New"));
toolbarNewArrowButton.setBorderPainted(false);
toolbarNewArrowButton.addActionListener(
  new ActionListener() {

代码示例来源:origin: ron190/jsql-injection

buttonRequestMethod.setBorderPainted(false);
buttonRequestMethod.setOpaque(false);

相关文章

JButton类方法