Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

setbounds in java

setBounds(int x-coordinate, int y-coordinate, int width, int height)
Comment

swing setbounds

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 :: java divisible by operator 
Java :: java selenium implicitly wait 
Java :: spigot kill entity 
Java :: How to close jframe on click of button 
Java :: select in selenium java 
Java :: set remove element java 
Java :: java Modulo 10^9+7 (1000000007) 
Java :: check if number is odd java 
Java :: java read keyboard input 
Java :: android studio proportional width 
Java :: string to byte array java 
Java :: java stream limit items 
Java :: java 8 find in list by property 
Java :: android list[index] 
Java :: check self permission android write_external_storage 
Java :: Java Stack class peek() method 
Java :: materialbutton remove shadow xml 
Java :: conversion of string to integer in java 
Java :: reentrantlock java 
Java :: check if sqlexception is duplicate entry java 
Java :: load file as string java 
Java :: set java path on linux ubuntu 
Java :: how to print something in java 
Java :: how to check if the file has remaining without reading from it java 
Java :: for each loop java 
Java :: fill two dimensional array rows by rows java 
Java :: javafx start 
Java :: javac celar 
Java :: icon label java 
Java :: matrix multiplication javascrpt 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =