How to create a JButton with Border

Below code shows how to create a JButton with border and add it to a JFrame window. /** * * @author Eric * site:www.techoverload.n...

Below code shows how to create a JButton with border and add it to a JFrame window.

/**
 *
 * @author Eric
 * site:www.techoverload.net
 */
import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.border.EtchedBorder;

public class JButtonBorder  extends JFrame{
  
   JButtonBorder()
   {
       super("JButton with Border");
     JButton b=new JButton("Button Border");
     b.setBounds(10, 10, 300, 20);
     b.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
     add(b);
  
     
             setLayout(null);     
             setSize(400,200);
             setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             setVisible(true);
   }
   
  public static void main(String args[])
  {
  new JButtonBorder();
  } 
    
}

COMMENTS

Name

android android Apps android emulators antivirus blogger bluestack Break Statement in Java constructors download downloader drivers emulators java java control statements java do-while loop java for loop java infinitive do-while loop java system methods java tutorials Java While Loop java.awt java.swing javalookandfeel javascript JButton JCheckBox JColorChooser JComboBox JDialog JFileChooser JFrame JLayeredPane JList JMenuBar joomla JOptionPane JPanel JPasswordField JPopupMenu JProgressBar JRadioButton JScrollBar JSlider JSpinner JTabbedPane JTable JTextArea JTextField JToolBar mysql php plugins Polymorphism setToolTiptext skype for windows software swing class themes Visual Studio Code WeChat whatsapp wordpress
false
ltr
item
Java Codes: How to create a JButton with Border
How to create a JButton with Border
https://1.bp.blogspot.com/-PHBhs6h8w2o/WZ1jXYMkrHI/AAAAAAAAIgA/0D_UacITKOAkLNUc_jcBi9a9PA_w942fACLcBGAs/s320/Jbutton-border.PNG
https://1.bp.blogspot.com/-PHBhs6h8w2o/WZ1jXYMkrHI/AAAAAAAAIgA/0D_UacITKOAkLNUc_jcBi9a9PA_w942fACLcBGAs/s72-c/Jbutton-border.PNG
Java Codes
http://www.download-all.net/2017/08/how-to-create-jbutton-with-border.html
http://www.download-all.net/
http://www.download-all.net/
http://www.download-all.net/2017/08/how-to-create-jbutton-with-border.html
true
7826648292785071009
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy