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




Have Programming Question? Ask it here!
 
 
 


ebuka
java panels
1 Answer(s)      5 years and 5 months ago
Posted in : Java Beginners



Advertisement
View Answers

April 8, 2009 at 1:33 PM


Hi friend,

Use the following code:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.Border;
public class AB extends JDialog{
public AB(JFrame frame, String str){
super(frame,str);
setUndecorated(true);
getRootPane().setWindowDecorationStyle(JRootPane.NONE);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent evt){
System.exit(0);
}
});
}
public static void main(String[] args){
try{
AB frame = new AB(new JFrame(),"");
JPanel panel = new JPanel();
Border border = BorderFactory.createTitledBorder("Welcome");
panel.setBorder(border);
JLabel lbl = new JLabel("RoseIndia");
panel.add(lbl);
frame.add(panel);
frame.setSize(300, 150);
frame.setVisible(true);
}
catch(IllegalArgumentException e){
System.exit(0);
}
}
}
Thanks


Related Tutorials/Questions & Answers:
java panels - Java Beginners
java panels  how can i remove the minimize, maximize and the cancel button of frame how can i add border to a JPanel  Hi friend, Use the following code: import javax.swing.*; import java.awt.*; import
navigation between panels when item is selected from jcombobox - Swing AWT
navigation between panels when item is selected from jcombobox  hi well i have a problem i have one main panel and on that there is one more panel... on JComboBox in Java visit to : http://www.roseindia.net/java/example/java/swing
Advertisements
java compilation error - Java Beginners
java compilation error  Hello madam/sir, i m a beginners in java. My problem is that i want to connect a login form to a frame containing 4 panels. how could i do it?Please help
how to save a gui form in core java
how to save a gui form in core java  please help me i am java beginner how to save a jframe containing jtable and panels in java thank you
java
java  Write a Java applet that draws a rectangle or an oval based on the width and height given by the user. Provide two text fields for the user... object while the text fields and buttons should be laid out on another two panels
java - Java Beginners
java  hi all, In Java swings, I created a array of JPanel and added listeners to it to move. These panel has null layout. When i run......the application is refreshed.. i want the bounds of panels should not change...when
Log4Fx
panels. It can output the logging information to any computer on network as well
JAVA - Java Beginners
of code and the action listeners. You will need two panels ? one for the drawing... or sad ? to draw. Java Hint The action listener you produce to respond... this by calling the Java repaint() method. This is a standard Java method that causes
Java Final Project - Java Beginners
Java Final Project  I am having a real hard time with this java...); inputText.setWrapStyleWord(true); //instantiate two panels, one for input and output Panel... = getContentPane(); //use borderlayout to position our two i/o panels container.setLayout
java - JDBC
); //initializing panels panel1 = new JPanel(); panel2 = new JPanel(); panel3... -------------------------------------- Read for more information. http://www.roseindia.net/java/example/java/awt/ Thanks. Amardeep
Java Server Faces (JSF)
Java Server Faces (JSF)      ... to build rapid data-driven Java web applications. To make efficient... Efficiency in Java programming language and well skilled in developing Java Server
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
Java
Java   Whether Java is pure object oriented Language
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   What is ?static? keyword
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
java
java  Does java allows multiline comments
Java
Java  how to do java in command prompt
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  how use java method
java
java  what are JAVA applications development tools
Java
Java   Whether Java is Programming Language or it is SOftware
java
java  is java purely object oriented language
java
java  why multiple inheritance is not possible in java
java
java  explain object oriented concept in java
java
java   difference between class and interface
Java
Java  how to draw class diagrams in java
java
java  write a java program using filenotfoundexception
java
java  hi im new to java plz suggest me how to master java....saifjunaid@gmail.com
java
java   How to set java Policy for applet using jdk 6
java
java  dear, i want a field for date picker using java/java script
java
java  why methods in java raise exceptions   Have a look at the following link: Java Exceptions
java
java online telephone directory  i need coding for online telephone directory..by using java....pls help me
Advertisements
 

 

 

DMCA.com