Java Spring Desktop application with multiple classes and jframe

Java Spring Desktop application with multiple classes and jframe

Hi i am developing a desktop java spring application..It has many Jframes forms and classes...How to close one Jframe from another..Please tell...

First jframe

package desktopapplication2; import java.awt.Graphics; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.management.ManagementFactory; import com.sun.management.OperatingSystemMXBean; import com.sun.servicetag.SystemEnvironment; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger;

public class NewJFrame1 extends javax.swing.JFrame {

/** Creates new form NewJFrame1 */
public NewJFrame1() {
    initComponents();
    GetSystemInfo();
     try {

        GetBiosInfo();
        GetMemInfo();
        GetCPUInfo();// TODO add your handling code here:
          } 
     catch (Exception ex) {
        Logger.getLogger(MainScreen.class.getName()).log(Level.SEVERE, null, ex);
    }
}

private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {

             Touchscreen t = new Touchscreen(); **---->This is not disposing Jframe2**
              t.dispo();

}

Second Jframe

package desktopapplication2;

import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.Timer;

public class Touchscreen extends JFrame {

/** Creates new form Touchscreen */
public Touchscreen() {
    initComponents();
    jLabel2.setVisible(false);
    this.setTitle("Touchscreen Test");
    jLabel1.setText("Testing Touchscreen");
    deletefile();
   this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    tc.start();
}

public void Touchscreen_dispo() { dispose(); ---->Even though this function is called,this Jframe is not disposing or hiding.. }

}

View Answers









Related Tutorials/Questions & Answers:
Java Spring Desktop application with multiple classes and jframe
Java Spring Desktop application with multiple classes and jframe  Hi i am developing a desktop java spring application..It has many Jframes forms and classes...How to close one Jframe from another..Please tell... First jframe
Java Spring Desktop application
Java Spring Desktop application  Hi i am developing a desktop java spring application..It has many Jframes forms and classes...How to close one Jframe from another..Please tell... First jframe package desktopapplication2
Advertisements
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
Java application that uses the classes and
Java application that uses the classes and   i have this class diagram with three classes: Curriculum, Course, and Lecture. Your class diagram...) I wish Write a Java application that uses the classes and methods above
java program to read multiple files from a directory and display them on a jframe
java program to read multiple files from a directory and display them on a jframe  hi guys i want to write a java program that will read all files in a directory and display them one by on on a jframe on jpanel with specific key
Simple Java Desktop Upload application
Simple Java Desktop Upload application  I try do simple example for upload applicationtake file from c:\ put to d:\ :) PLEASE HELP
desktop application
desktop application  how to transfer data swing text field to browser text field to their corresponding label/caption. please reply as soon as possible. thanks vijay
display multiple images from postgres database in jframe
display multiple images from postgres database in jframe  i just want to display multiple images on jframe by firing a query on postgres database
steps to create desktop application in java swing using eclipse with drag and drop options
steps to create desktop application in java swing using eclipse with drag and drop options  please help to create desktop application in java swing using eclipse with drag and drop and what are the plugins required
java spring simple application
java spring simple application  hai I have design a simple application in this I always found class not found exception. I am sendig code as follows.../beans/spring-beans-2.5.xsd"> <bean id="studbean" class="StudentComponent
ssl comunication between a desktop application and a web application
ssl comunication between a desktop application and a web application  Hi Lusiano, I am trying to implement a ssl comunication between a desktop application and a web application. can you please share code with me. Please
Java classes
Java classes  Which class is extended by all other classes
java classes
java classes  Which class is the super class for all classes in java.lang package
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
ModuleNotFoundError: No module named 'Messenger-Desktop-Client-Application'
ModuleNotFoundError: No module named 'Messenger-Desktop-Client-Application...: ModuleNotFoundError: No module named 'Messenger-Desktop-Client-Application' How...-Application python with following command: pip install Messenger-Desktop-Client
ModuleNotFoundError: No module named 'Messenger-Desktop-Server-Application'
ModuleNotFoundError: No module named 'Messenger-Desktop-Server-Application...: ModuleNotFoundError: No module named 'Messenger-Desktop-Server-Application' How...-Application python with following command: pip install Messenger-Desktop-Server
JFrame
JFrame  Hi, I have JFrames in my application and i'm developing application using NetBeans IDE 6.5. I have many jframes. Whenver i click a menu... Jframe. How can i do it. Please help me to do it. Or what else can i have
how to move label in jframe in java?
how to move label in jframe in java?  please any one can give me code for moving a java label in Jframe
JFRAME - Java Beginners
javax.swing.*; import java.awt.event.*; public class MenuExample extends JFrame
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
Spring Web Annotation Classes
Spring Web Annotation Annotation is introduced since java 5. It is a new kind... and it is not a part of your program. Spring framework also provides a wide range of annotation, some of them which is commonly is used in Spring MVC is explained
jframe
jframe  how to create a jframe.provide me the java code pls
multiple inheritance - Java Beginners
)why java classes does not support Multiple Inheritance? JAVA CLASSES ONLY... Inheritance. Ans...>java classes doesn't support multiple inheritance,the practical.... } That's why java classes does not support multiple inheritance.But java interfaces
Java classes
Java classes  What is the Properties class
java classes
java classes  What is the ResourceBundle class
Java classes
Java classes  What is singleton pattern
Java classes
Java classes  Why default constructor of base class will be called first in java
java classes
java classes  What is the difference between a static and a non-static inner class
is it possible to connect the multiple databases from the hibernate application
is it possible to connect the multiple databases from the hibernate application  is it possible to connect the multiple databases from the hibernate application,if it is possible then tell me with step wise manner
Classes in Java
Classes in Java      ... java have mechanisms for handling exceptions. This is known as catching exception in Java. The exceptions that occur in the program can be caught using try
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
Java list of uninstantiated classes
Java list of uninstantiated classes  Java list of uninstantiated classes
java desktop - Java Beginners
java desktop  Hi, Iam created a desktop login application using... SUBMIT; JFrame f; JLabel label1,label2; final JTextField text1; final JPasswordField text2; LoginDemo(){ f=new JFrame(); f.getContentPane().setLayout
java desktop - Java Beginners
java desktop  Hi, Iam created a desktop login application using... SUBMIT; JFrame f; JLabel label1,label2; final JTextField text1; final JPasswordField text2; LoginDemo(){ f=new JFrame(); f.getContentPane().setLayout
GWT supported java classes
GWT supported java classes  What are the methods and classes in Java which are supported and unsupported by GWT
Helper classes in java
Helper classes in java  helper classes
Collection classes in java
is the reason using java collection classes saved/stored the data/content.I don't understand, what is the idea using java collection classes in project. Or the data is stored in both database and java collection classes
Collection classes in java
is the reason using java collection classes saved/stored the data/content.I don't understand, what is the idea using java collection classes in project. Or the data is stored in both database and java collection classes
java classes. - Java Beginners
java classes.  I con not understand the behavior of anonymous inner classes?   Hi friend, I am sending you a link. This link will help you. Please for more information. http://www.roseindia.net
java--desktop appilication - JDBC
java--desktop appilication  when class.forName() is called ,,,a class is loaded...once after the class is loaded ..if we call class.forName, it will call the class which is already present.......what to do if we want to load
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 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
Create a Desktop Pane Container in Java
Create a Desktop Pane Container in Java   ... pane container in Java. The desktop pane container is a container, which has.... The desktop pane is like a MDI (Multiple Document Interface) frame and all internal
What is Abstract classes in Java?
What is Abstract classes in Java?  What is Abstrack class in Java...,   Hi, In Java programming language we are used the Java Abstract.... That's why the Abstract class in Java programming language is used to provide
DESKTOP SHARING USING JAVA
DESKTOP SHARING USING JAVA  Sir i have the following code for scren... extends JFrame implements Serializable{ ServerSocket serverSocket; Socket socket... image; File file; JFrame frame; RemoteDesktopServer server; //static Vector<
JAVA CLASSES/ SUPERCLASS
JAVA CLASSES/ SUPERCLASS  i. Define a class called Student and its two subclasses named underGraduateStudent and postGraduateStudent. Make a subclass of Employee. A person has a name, address, phone number, and email address
Java FontMetrics classes
Java FontMetrics classes  What is the difference between the Font and FontMetrics classes?  The Font class provides mappings to fonts that are used to render text data onto the screen. The Font class maps
Struts2.2.1 handle multiple Submits in your application
Struts2.2.1  handle multiple Submits in your application  In this tutorial, We will discuss about the handling the multiple submits in the application. In this example we enter the detail in the form and submit.if we
Spring application in RSA 7.0.0.3
Spring application in RSA 7.0.0.3  how to build a sample spring application using RSA 7.0.0.3
Multiple Inheritance Problem - Java Beginners
Multiple Inheritance Problem  Hello Friend why Multiple Inheritance is not supported by java???? one of the answer i got that if there are three methods i. void show() in 3 super-classes named as A,B,C and if i extends A,B,C

Ads