Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

swing 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);

}}
Comment

PREVIOUS NEXT
Code Example
Java :: string array to string java 
Java :: java tomorrow date 
Java :: javafx resizable window 
Java :: static int java 
Java :: java bigdecimal check less zero 
Java :: java detect new line in string 
Java :: hide elements android 
Java :: map interation in java 
Java :: java remove trailing zeros from float 
Java :: how to add input in array java 
Java :: Java, how to compare Strings with String Arrays 
Java :: java text file to arraylist 
Java :: how to add 2 numbers in java 
Java :: android get list element by index 
Java :: add view to relativelayout programmatically 
Java :: get timezone offset java 
Java :: print float number with only four places after the decimal point in java 
Java :: junit vintage engine maven 
Java :: set size button java 
Java :: print an array java 
Java :: how to declare and insert value to arraylist in same line in java 
Java :: fhow to find location of java jdk 
Java :: Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: plugins.flutter.io/webview 
Java :: Duration class java 
Java :: declare array of chars java 
Java :: arraylist to int array conversion in java 
Java :: how to change double to int in java 
Java :: if is true javascrtiptr 
Java :: java localtime 
Java :: java run code at interval 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =