hud*_*udi 2 java swing jbutton
我希望JButton看起来像HTML中的链接.它仍然是一个按钮,当我点击它时它会打开一些新的JFrame.但我想改变它的样子.我试过这个:
JButton button = new JButton();
button.setText("hi");
button.setContentAreaFilled(false);
button.setBorderPainted(false);
button.setOpaque(false);
button.setBackground(Color.WHITE);
button.setCursor(Cursor.getPredefinedCursor(12));
Run Code Online (Sandbox Code Playgroud)
但是我的按钮文本周围仍然有一些边框.我们如何完全删除边框?
| 归档时间: |
|
| 查看次数: |
3526 次 |
| 最近记录: |