Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Magazine layout manager
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


harish bewingidad
layout manager
1 Answer(s)      4 years ago
Posted in : Java Magazine


how to use Absolute Layout manager in java form ?


Advertisement
View Answers

November 17, 2010 at 12:08 PM


Hi Friend,

You can try the following code:

import java.awt.*;
import javax.swing.*;

public class SwingFrame{
public static void main(String[] args) throws Exception{
SwingFrame sf=new SwingFrame();
}
public SwingFrame(){
JFrame f = new JFrame("Frame in Java Swing");
f.getContentPane().setLayout(null);
JLabel lbl1 = new JLabel("Name");
JTextField jt1=new JTextField(15);
JLabel lbl2=new JLabel("Address");
JTextField jt2=new JTextField(15);
JButton b=new JButton("Submit");
lbl1.setBounds(100,120,70,20);
lbl2.setBounds(100,150,70,20);
jt1.setBounds(170,120,100,20);
jt2.setBounds(170,150,100,20);
b.setBounds(170,180,100,20);
f.add(lbl1);
f.add(lbl2);
f.add(jt1);
f.add(jt2);
f.add(b);
f.setSize(1000,1000);
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

For more information, visit the following:

Java Swing Tutorials

Thanks



Related Tutorials/Questions & Answers:
layout manager
layout manager  how to use Absolute Layout manager in java form
Layout Manager
Layout Manager  for compile file "Javac SApplet.java" (working fine) but, java SApplet (not compile) error message: Exception in thread "main" java.lang.NoSuchMethodError:main Please follow the program import
Advertisements
Layout manager in flex
Layout manager in flex  Hi.... What is Layout Manager and explain the Properties and Methods? Now let's know how we will use these properties and methods........ Thanks
Java layout manager
Java layout manager  Which containers use a FlowLayout as their default layout
Java layout manager
Java layout manager  What advantage do Java's layout managers provide over traditional windowing systems
Java Layout
Java Layout       In java a layout manager class implements the LayoutManager interface. It is used.... Components can provide size and alignment hints, still the container's layout manager has
java layout
java layout  What is a layout manager
Border Layout
Border Layout  which containers use a border Layout as their default layout
tables for layout
tables for layout  Are there any problems with using tables for layout
java layout
java layout  What method is used to specify a container?s layout
tables for layout
tables for layout  Are there any problems with using tables for layout
Resource Manager
Resource Manager   Hi... What is a resource Manager in Flex? Please tell me the answer of this question. Thanks  Ans..., which easily access the single instance of this manager. getInstance
java Layout
java Layout  sir i want a program of all the layout of java which have two or three button and a database connectivity
general layout HTML documents
general layout HTML documents  Explain the general layout HTML documents
Role of Project Manager
Role of Project Manager  What are the role of a project manager in an Organisation
HTML Layout
HTML Layout       A Web Page Layout is likey to be the layout of the pages... columns are created by using tables to design the layout. This can be done
Layout problem - Java Beginners
Layout problem  How can i place the component without mentioning the layout ?  Use SetBounds for the components and set the layout as null
rmi Security Manager
rmi Security Manager  what type of security provide java rmi security Manager
php events manager - PHP
php events manager  I am looking for a design and structure for the php events manager. Is there any free app on internet that i can use
Drag Manager in flex
Drag Manager in flex  HI... Please tell me about What is a drag manager in flex? Give me the answer with example Thanks  Ans: The DragManager class manage drag and drop operation in which you can move
HTML table layout
HTML table layout  i have table layout in that i have menu in td...(column) ,plz give me code and give me useful layout examples,because my requirement is layout using table
Struts Layout Examples - Struts
Struts Layout Examples  Hi, Iam trying to create tabbed pages using the struts layout tag. I see the tab names on the page but they cannot be clicked on. Im not able to find simple examples/explanation on it. Any help
VoIP Manager
VoIP Manager          VoIP Manager connector for Netcool NetIQ VoIP Manager Suite (VoIP Manager) provides the industry?s most comprehensive solution for managing
VDividedBox layout container
VDividedBox layout container       VDividedBox Layout Container is similar to VBox Layout Container. The difference is, it adds a divider between its child components which can be used
DividedBox layout container
DividedBox layout container       DividedBox Layout Container is similar to Box Layout Container. The difference is, it adds a divider between its child components which can be used
HDividedBox layout container
HDividedBox layout container       HDividedBox Layout Container is similar to HBox Layout Container. The difference is, it adds a divider between its child components which can be used
Java Swing Card Layout
layout manager. Multiple components on card can be added but at a time only one...Java Swing Card Layout Java technology uses Layout Managers to define... types of Layout Managers which implements the LayoutManager interface
Flex Cursor Manager Example
in your flex application. The most important work of the cursor manager.... If the user don't want to use the system cursor then cursor manager... is UIComponent that is set the cursor. The cursor manager is import
Struts-Layout
Struts-Layout       Struts-Layout is a tag library for Apache Struts which provides easy and fast interface creation. This is achieved by powerful tags which display panels, input fields
What is the responsibility of project manager in software company
What is the responsibility of project manager in software company  What is the responsibility of project manager in software company
How to disable task manager using java
How to disable task manager using java  How to disable task manager using java
 

 

 

DMCA.com