JFRAME 1 Answer(s) 2 years and 8 months ago
Posted in : Java Beginners
i am creating menu bar(file,edit) & in file am creating menuItems(new,open).. actionevent given to open(menuitem)... now when click on open i want open filechooser what is logic sirr??
jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
public class MenuExample extends JFrame { JMenuBar menuBar = new JMenuBar(); JMenu menu = new JMenu("File"); JMenu menu1 = new JMenu("Edit"); JMenuItem item1 = new JMenuItem("New"); JMenuItem item2 = new JMenuItem("Open");
}); } public static void main(String[]args){ MenuExample ex=new MenuExample(); }
}
Thanks
Related Pages:
JFrame
JFrame write an application with a JFrame that five labels describing reasons that a customer might not buy your product(for example "Too expensive") every time the user clicks a Jbutton, remove one of the negative reasons
jframe
jframe Create a JFrame for the Summervale Resort. Allow the user to view the information about different rooms available, dining options and activities offered. Include at least two options in each menu and display appropriate
JFrame Jframe. How can i do it. Please help me to do it. Or what else can i have
jframe background color not showing jframe background color not showing jframe background color is not showing. please suggest.
Just add the background color to JPanel and then add it to JFrame. For example ..
JFrame myFrame = new JFrame();
JPanel
jumping frame jFrame to jInternalframe
jumping frame jFrame to jInternalframe Afternoon sir,
I want to ask... and sub menu(employee).
in Form Login(jFrame) have username(textfield1) and password(passwordfield1), in Menu(jframe) have Menu employee(jMenu),creaby(jlabel1
JFRAME - Java Beginners
javax.swing.*;
import java.awt.event.*;
public class MenuExample extends JFrame
Adding JTable into existing Jframe.
Adding JTable into existing Jframe. i need to add JTable into this code pls help me..
package Com;
import Com.Details;
import java.awt.Color...("serial")
public class AddPage extends JFrame
{
JDesktopPane pane = new
Adding JTable into existing Jframe.
Adding JTable into existing Jframe. i need to add JTable into this code pls help me..
package Com;
import Com.Details;
import java.awt.Color...("serial")
public class AddPage extends JFrame
{
JDesktopPane pane = new
Adding JTable into existing Jframe.
Adding JTable into existing Jframe. i need to add JTable into this code pls help me..
package Com;
import Com.Details;
import java.awt.Color...("serial")
public class AddPage extends JFrame
{
JDesktopPane pane = new
how to add scrollbar to JFrame
how to add scrollbar to JFrame hello friends
i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame hello friends
i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame hello friends
i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame hello friends
i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
how to add scrollbar to JFrame
how to add scrollbar to JFrame hello friends
i am making a java application in which i have a frame to which i wanted to add scrollbars but when i add my panel to scrollpane and then add that scrollpane to JFrame than
JFrame Button click to start play JFrame Button click to start play i made a game and and i add a button in new jframe and i want when i click it it start to play...can anyone help me
JFrame Components Printing - Swing AWT JFrame Components Printing hi sir i am doing a project so i am working in netbeans
i have to print a JFrame it contains Labels and few textboxfields so i want to take the whole JFrame contents for printing so would you
setbackground image to JFrame - Java Beginners
setbackground image to JFrame how to setbackground image to JFrame... TransparentBackgroundImage
{
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.addWindowListener( new WindowAdapter() {
public
insert image in JFrame - Development process
);
}
static public void main(String args[]) throws
Exception {
JFrame frame = new JFrame("Display image");
Panel panel = new ShowImage
JFrame Components Printing - Swing AWT JFrame Components Printing hi sir
thanks a lot for your reply...
but i go through the link that you have specified
http://www.roseindia.net/java... this
public class PrintExample extends JFrame implements ActionListener {
public
JFrame components printing - Swing AWT JFrame components printing hi sir
thanks a lot for your reply...
but i go through the link that you have specified
http://www.roseindia.net/java... PrintExample extends JFrame implements ActionListener {
public static void main
JFrame components printing - Swing AWT JFrame components printing hi sir
thanks a lot for your reply...
but i go through the link that you have specified
http://www.roseindia.net/java... PrintExample extends JFrame implements ActionListener {
public static void main
Java Image On JFrame Title
How to set Image On JFrame
In this section, you will learn how to set an image on JFrame title using Java program. For
this, we have created an object of JFrame class. Then, we have used Toolkit.getDefaultToolkit().getImage
How to create file from input values in Jframe ?
How to create file from input values in Jframe ? hi i m doing my... an object for it.my java code is
public class submit {
JFrame frame;
JTextArea text1;
void form()
{
frame=new JFrame("details you have entered are");
JPanel
passing data from one jframe to another
passing data from one jframe to another I have two JFrame,built... in the first Jframe to another JLabel in the other JFrame.Can you please help me,how...*;
import java.awt.event.*;
class PassData extends JFrame
{
JTextField text
how to draw a table on jframe in java - Java Beginners
how to draw a table on jframe in java how to draw a table on jframe in java? Hi friend,
import java.awt.*;
import... scrollPane = new JScrollPane(table);
JFrame frame = new JFrame
Java Spring Desktop application with multiple classes and jframe
and classes...How to close one Jframe from another..Please tell...
First jframe...;This is not disposing Jframe2**
t.dispo();
}
Second Jframe
package... extends JFrame {
/** Creates new form Touchscreen */
public Touchscreen
Program to read the text from a file and display it on a JFrame.
Program to read the text from a file and display it on a JFrame.  ...*;
class MegaViewer1 extends JFrame
{
JTabbedPane jtp1=new JTabbedPane... java.lang.*;
import java.awt.*;
class MegaViewer1 extends JFrame
{
JTabbedPane jtp1
Exception when opening a excel file in JFrame
Exception when opening a excel file in JFrame Hello,
I have a problem when trying to display a Excel file in a Jframe. The exception is like...() throws ExcelException{
JFrame frame= new JFrame("Test application
JFrame - Window
Java: JFrame - Window
Description
The javax.swing.JFrame class is used... pane or menu bar.
Constructors
You can create a frame like this:
JFrame w = new JFrame("your title"); // OK, but it's better to use subclassing as below
Displaying search results in same panel of gridview in same jframe window.
Displaying search results in same panel of gridview in same jframe window... search and see the results in the same panel of the Jframe in Gridview Jtable... in the Jtable gridview format in the sam epanel of jframe window .But when i execute
Displaying search results in same panel of gridview in same jframe window.
Displaying search results in same panel of gridview in same jframe window... search and see the results in the same panel of the Jframe in Gridview Jtable... in the Jtable gridview format in the sam epanel of jframe window .But when i execute
Problem in setting IP address for a JFrame Class Desktop Application
Problem in setting IP address for a JFrame Class Desktop Application I have designed a browser for our final year project, it is working well. But when we put it in a system which has a proxy setting for internet connection
navigating the value of JTextField from one JFrame to another - Swing AWT
navigating the value of JTextField from one JFrame to another hello... JFrame ....
Can anyone plz tell me how we can do this...can anybody give me... java.awt.event.*;
public class NavigateTextField extends JFrame{
JLabel
navigating the value of JTextField from one JFrame to another - Swing AWT
navigating the value of JTextField from one JFrame to another Hello
first of all thankyou very very much for your reply..
the code which you gave... JFrame{
JLabel label1,label2;
JTextField text1,text2;
JPanel panel;
JButton
Java Swing : JFrame Example
Java Swing : JFrame Example
In this section, you will learn how to create a frame in java swing.
JFrame :
JFrame class is defined in javax.swing.JFrame.... holds all the non-menu components
displayed by the JFrame. The content pane
JFrame Close On Button Click JFrame Close On Button Click
In this section we will discuss about how... will create a method for creating the GUI. The GUI will contain a
JFrame...
{
JButton button;
JFrame frame;
public void createUI