Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java button

import javax.swing.*;    
public class button {  
public static void main(String[] args) {  

JFrame frame = new JFrame;
frame.setSize(400, 400);
frame.setVisible(true);
frame.setLayout(null);
  
  //create button
  
JButton btn = new JButton("ok");
btn.setBounds(150, 200, 50, 50); // Properties of button, size, x, and y.
  
  //append button to frame
  
frame.add(btn);

}}
 
PREVIOUS NEXT
Tagged: #java #button
ADD COMMENT
Topic
Name
2+9 =