I want to keep a frame designed in java in Task bar, so that what ever window i am opening my frame will be visible.
Please tell me How to do this
Please tell me How to do this
import javax.swing.*; public class JFrame01 extends JFrame { public static void main(String args[]) { JLabel emptyLabel = new JLabel(" "); // Step01 Create a object of Frame class JFrame frame = new JFrame(" JFrame "); // Step 02 when the frame is closes frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Step 03 Create components and put them in the frame. frame.getContentPane().add(emptyLabel); // Step 04. Size the frame. frame.pack(); // Step 05. Show it. frame.setVisible(true); } }
import javax.swing.*; public class JFrame01 extends JFrame { public static void main(String args[]) { JLabel emptyLabel = new JLabel(" "); // Step01 Create a object of Frame class JFrame frame = new JFrame(" JFrame "); // Step 02 when the frame is closes frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Step 03 Create components and put them in the frame. frame.getContentPane().add(emptyLabel); // Step 04. Size the frame. frame.pack(); // Step 05. Show it. frame.setVisible(true); } }
import javax.swing.*; public class JFrame01 extends JFrame { public static void main(String args[]) { JLabel emptyLabel = new JLabel(" "); // Step01 Create a object of Frame class JFrame frame = new JFrame(" JFrame "); // Step 02 when the frame is closes frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Step 03 Create components and put them in the frame. frame.getContentPane().add(emptyLabel); // Step 04. Size the frame. frame.pack(); // Step 05. Show it. frame.setVisible(true); } }
Comment