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




Have Programming Question? Ask it here!
 
 
 


Nitin Sharma
frames
1 Answer(s)      5 years and 4 months ago
Posted in : Java3D



Advertisement
View Answers

April 13, 2009 at 12:05 PM


Hi Friend,

You can use JInternalFrame class to create multiple frames in java as we have used in the following code:

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

public class MultipleFrames{
JDesktopPane desk;
JInternalFrame frame1,frame2,frame3,frame4;
JFrame frame;
public static void main(String[] args) {
MultipleFrames d = new MultipleFrames();
}

public MultipleFrames(){
frame = new JFrame("Multiple Frames");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
desk = new JDesktopPane();
frame1 = new JInternalFrame("Frame1",true,true,true,true);
frame1.setBounds(20, 200, 150, 100);
frame1.setVisible(true);
frame2 = new JInternalFrame("Frame2",true,true,true,true);
frame2.setBounds(20, 140, 150, 100);
frame2.setVisible(true);
frame3 = new JInternalFrame("Frame3",true,true,true,true);
frame3.setBounds(20, 80, 150, 100);
frame3.setVisible(true);
frame4 = new JInternalFrame("Frame4",true,true,true,true);
frame4.setBounds(20, 20, 150, 100);
frame4.setVisible(true);
desk.add(frame1);
desk.add(frame2);
desk.add(frame3);
desk.add(frame4);
frame.add(desk);
frame.setSize(400,400);
frame.setVisible(true);
}
}

Thanks


Related Tutorials/Questions & Answers:
Frames
Frames  using awt how i can link two frames? for example i just want that when i press on the button of frame "frame1" it takes me on another window "frame2" with desired output and hide the "frame1" please help me out
HTML frames
HTML frames  Are there any problems with using frames
Advertisements
HTML frames
HTML frames  Do search engines dislike frames
create frames
create frames  How do I create frames? What is a frameset
frames - Java3D
frames  how can i create multiple frames in java?  Hi Friend, You can use JInternalFrame class to create multiple frames in java as we...("Multiple Frames"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE
update two frames at once
update two frames at once  How do I update two frames at once
HTML Frames Example
HTML Frames Example  Hi, Can anyone provide me HTML Frames Example code? I have to one a web page say http://www.roseindia.net in Frame? Thanks...;frame src="frame1.html"> tags for creating frames in HTML. Read at Frames
border around frames
border around frames  How do I remove the border around frames
HTML combination of frames
HTML combination of frames  How do I specify a specific combination of frames instead of the default document
Regarding frames in HTML
Regarding frames in HTML  I have created a html page including two frames in it,one frame consists "search bar" and the other frame consists login page,when i click on "Sign In" button in login frame,it is displaying the results
java Frames - Java Beginners
java Frames  Hi friend, Thanks for your reply. Can i use frames in socket program.  Hi anita, I am sending you a link. This link will help you. Please visit for more information. http
Do search engines dislike frames?
Do search engines dislike frames?  Do search engines dislike frames
Extract frames from Video File
Extract frames from Video File  How to extact the frames from a particular video file and save them in .jpeg format
Frames from a yuv video file
Frames from a yuv video file  hi, please help me with the java code for extracting frames of yuv video file. After extraction the images should be stored in jpeg format. Please help me
Frames from a yuv video file
Frames from a yuv video file  hi, please help me with the java code for extracting frames of yuv video file. After extraction the images should be stored in jpeg format. Please help me
Finding Lost Frames - Java tutorial
Finding Lost Frames 2001-05-10 The Java Specialists' Newsletter [Issue 019] - Finding Lost Frames Author: Dr. Heinz M. Kabutz If you are reading... Lost Frames Something that I have encountered in some almost-complete
displaying a physical webpage with frames in iframe
displaying a physical webpage with frames in iframe  i have iframe... in iframe.index.html page contains frames divided into 2,each from different sources.i tried to display a sample webpage without frames and it was a success
how to connect two swing frames
how to connect two swing frames  how to connect two swing frames   Hi Friend, Try this: 1)LoginDemo.java: import java.sql.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; class LoginDemo extends
how to divide a web page into some frames.....
how to divide a web page into some frames.....  how to divide 1 web page into some parts. i know it using frames in html,bt how can we do it in jsp... page,bt m nt knowing how to divide that into frames in jsp.  Please go
how to devide a web page into parts and setting the targets like frames but without using frames
how to devide a web page into parts and setting the targets like frames but without using frames  Here is my requirement, I have to devide a web... by user.I am using jsp.(This requirement must be fulfilled without using frames
Getting all frames in a JDesktopPane container
Getting all frames in a JDesktopPane container  ... the number of visible internal frames in a JDesktopPane container. The JDesktopPane... frames role like the child frame of the JDesktopPane container. Screen shots
How to create Multiple Frames using Java Swing
Multiple Frames in Java Swing In this section, you will learn how to create multiple frames. Java Swing provides the utility to show frame within another... JFrame("Multiple Frames"); frame.setDefaultCloseOperation(JFrame.EXIT
is it possible to display page in full frame...after dividing page into frames...and is it possible to close frame
is it possible to display page in full frame...after dividing page into frames...and is it possible to close frame   in page.xhtml
How To Create Internal Frames In Java
How To Create Internal Frames In Java In this tutorial we will learn about how... till the application is running and want to do operations on an another frames lying within the internal frames. To create internal frames in Java you may
Framework
Framework  Which frames are suitable for what
Event handling on an image
Event handling on an image  I want to divide an image into frames and want to do event handling on the frames
backround
backround  how to add background image in frames of swings
backround
backround  how to add background image in frames of swings
java swings - Swing AWT
java swings  hi everyone, can we make a chain of frames with JSplitpane and run a shell script in any one of those frames
product enquiry form
product enquiry form  how frames are created and write a java program for product enquiry form using Jframe
SWING FRMES
SWING FRMES  hai SIR? HOW TO DESIGN swing Frames send source code
SWING FRMES
SWING FRMES  hai SIR? HOW TO DESIGN swing Frames send source code
divide html page
divide html page   how to divide html page into 3 parts without using frames
java - Struts
java  how to use frames in struts prog -- any sample example prog give
jmf
jmf  how to extract the frames from video file using java...give me the clear step by step explanation with code soon
how can i close particular frame in swings - Java Beginners
, how can we close a particular frame when mulitple frames are appearing as output when clcking close button. let us assume that we got three frames as output in swings and three frames are having their own close buttons and when i click
connect 3 frameset to other 3 different frameset in html
connect 3 frameset to other 3 different frameset in html  first display the 3 frames in one html page after login it will display 3 differnt frame
connect 3 frameset to other 3 different frameset in html
connect 3 frameset to other 3 different frameset in html  first display the 3 frames in one html page after login it will display 3 differnt frame
HTML frameset example
HTML frameset example  Hi, How to use html frameset for creating frames in HTML? Thanks   Hi, Please check the Vertical Frameset in HTML example code. Thanks
JFarme connection
JFarme connection  I am making a system that requires to connect two already made J Frames such that by clicking on a button on the first J Frame, the second J Frame appears and the first one disappears.what is the code to do
FRAME
FRAME  WHILE I'M RUNNINGFILE OF A GUI PROGRAMME(JDBC CONNECTION) INSTEAD OF OUTPUT FRAME ONLY TWO BLANK FRAMES ARE GETTING DISPLAYD... CAN ANYONE HELP ME TO SOLVE DS PROBLEM
FRAME
FRAME  WHILE I'M RUNNINGFILE OF A GUI PROGRAMME(JDBC CONNECTION) INSTEAD OF OUTPUT FRAME ONLY TWO BLANK FRAMES ARE GETTING DISPLAYD... CAN ANYONE HELP ME TO SOLVE DS PROBLEM
need a java program - Java Beginners
need a java program  Draw a bar chart for the following data using frames Year: 2000 2001 2002 2003 2004 2005 TurnOver:7 8 4 5 9 12
login page with image
login page with image  I am writing program for login page.It consists of a image and the login details... how to write a java program using frames... used multiple frames to design but the position of image is changing when
Java
Java  I have two frames in two separate classes, i need to save the both frame information in a single table in database. somebody tell use constructor to pass the values for next frame. but i need to pass 15 values from frame1
single frame coding in java
single frame coding in java  sir, i am a beginner in java.i want to do a desktop application in java in which a single frame satisfies all needs.but i want changes in that frame only.how can i solve this?i think multiple frames
JSF Related
JSF Related  In what way JSF makes the difference between Applets?? After reading this article I understood instead of using Request and response, we are directly dealing with the Listeners... If soo... we can develop the frames
sdf
sdf  In what way JSF makes the difference between Applets?? After reading this article I understood instead of using Request and response, we are directly dealing with the Listeners... If soo... we can develop the frames
 

 

 

DMCA.com