Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

setbounds in java

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

java 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 :: int to enum java 
Java :: java game 
Java :: turn ascii into text javascriot 
Java :: Java JPanel set background color 
Java :: println java 
Java :: solid principles in programming 
Java :: sort list of string lexicographically java 
Java :: java join list as string 
Java :: read json file java 
Java :: fibonacci series in java using recursion 
Java :: java get sub array 
Java :: spring boot procfile run profile 
Java :: java random unique key 
Java :: array liste java 
Java :: why java platform independent 
Java :: jsonarray to list java 
Java :: circular textview android 
Java :: java example 
Java :: clear jtable rows java 
Java :: how to do the maximum of three numbers in java 
Java :: android checkbox tint color 
Java :: view get text android 
Java :: set password visible in android 
Java :: java create list integer range 
Java :: flow dependency android 
Java :: Java make digit numbers 
Java :: how to get last element of array java 
Java :: how to use deque as stack or queue in java? 
Java :: check GPS is on android 
Java :: add opacity to activity android 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =