round « Button « Java Swing Q&A





1. Java rounded Swing JButton    stackoverflow.com

Well, I have an image that I would like to put as a background to a button (or something clicable). The problem is that this image is round, so I needed to ...

2. make a button round    stackoverflow.com

im trying to make a JButton round at the (x,y) corrds of (150,210). i want the button to be an oval of the size (40,40). and the buttons background color red. ...

3. How can i create a frame with round edges in Java..I have already created round edge button    stackoverflow.com

import java.awt.*;
import javax.swing.*;
import java.awt.geom.*;
import java.awt.event.*;
import javax.swing.border.*;

public class ChangeButtonShape {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.getContentPane().setLayout(null);
JLabel l=new JLabel("Name");
final JTextField text=new JTextField(20);
JButton button = new JButton("Go");
//button.setBackground(Color.lightGray);
l.setBounds(10,10,100,20);
text.setBounds(100,10,180,20);
button.setBounds(10,40,50,20);
button.setBorder(new RoundedBorder(10));
frame.add(l);
frame.add(text);
frame.add(button);

button.addActionListener(new ActionListener(){
   ...

4. JButton with Rounded edges    coderanch.com

5. how to create rounded button    coderanch.com

6. rounded buttons    coderanch.com