473,396 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Java Frame

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
Aug 29 '07 #1
9 2683
JosAH
11,448 Expert 8TB
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
Simply create a JFrame and display it; by default frames will have an icon
visible in the task bar.

kind regards,

Jos
Aug 29 '07 #2
Simply create a JFrame and display it; by default frames will have an icon
visible in the task bar.

kind regards,

Jos
I have to design a Progress bar in java and i have to keep the progress bar in the Task bar itself.

Please tell me a Solution for that.
Aug 29 '07 #3
Nepomuk
3,112 Expert 2GB
I have to design a Progress bar in java and i have to keep the progress bar in the Task bar itself.

Please tell me a Solution for that.
So, do I understand correctly: You want a new Icon or Symbolbar in the Taskbar, and this should be your progress bar? Hm, difficult one...

If you're using jdk 1.6 or later, have a look at java.awt.SysemTray. Here's some information and some links. I don't know about earlier versions of jdk, just have a look around. Searching Google with the words "Taskbar" "System Tray" and, of course, "java" might help.
Aug 29 '07 #4
JosAH
11,448 Expert 8TB
So, do I understand correctly: You want a new Icon or Symbolbar in the Taskbar, and this should be your progress bar? Hm, difficult one...

If you're using jdk 1.6 or later, have a look at java.awt.SysemTray. Here's some information and some links. I don't know about earlier versions of jdk, just have a look around. Searching Google with the words "Taskbar" "System Tray" and, of course, "java" might help.
That SystemTray implementation is severly broken; when it was in its prototype
stage Sun promised/suggested that Swing components could be used to populate
the darn thing. For their final version they reverted to simple AWT components
instead. A progress bar is a JComponent (Swing) which can't be properly handled
by that silly system tray.

kind regards,

Jos
Aug 29 '07 #5
Please Tell me is there any other way to do that
Aug 30 '07 #6
JosAH
11,448 Expert 8TB
Please Tell me is there any other way to do that
Having a progress bar in the system tray or taskbar is nearly impossible unless
you design a couple of images (icons) which you can use to make it *look* like
a progressbar. But it I were you, I'd forget about it because people would find
it strange looking and it's not conforming to any GUI style guide.

kind regards,

Jos
Aug 30 '07 #7
praveen2gupta
201 100+
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
see following code for understanding basic concept only
Expand|Select|Wrap|Line Numbers
  1. import javax.swing.*;
  2.  
  3. public class JFrame01 extends JFrame {
  4.     public static void main(String args[])     {
  5.         JLabel emptyLabel = new JLabel("  ");
  6.  
  7.              // Step01    Create a object of Frame class
  8.         JFrame frame = new JFrame(" JFrame ");
  9.  
  10.             // Step 02   when the frame is closes
  11.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12.  
  13.             // Step 03  Create components and put them in the frame.
  14.         frame.getContentPane().add(emptyLabel);
  15.  
  16.             // Step 04. Size the frame.
  17.         frame.pack();
  18.  
  19.             // Step 05. Show it.
  20.         frame.setVisible(true);
  21.     }
  22. }
  23.  
Aug 31 '07 #8
JosAH
11,448 Expert 8TB
see following code for understanding basic concept only
Expand|Select|Wrap|Line Numbers
  1. import javax.swing.*;
  2.  
  3. public class JFrame01 extends JFrame {
  4.     public static void main(String args[])     {
  5.         JLabel emptyLabel = new JLabel("  ");
  6.  
  7.              // Step01    Create a object of Frame class
  8.         JFrame frame = new JFrame(" JFrame ");
  9.  
  10.             // Step 02   when the frame is closes
  11.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12.  
  13.             // Step 03  Create components and put them in the frame.
  14.         frame.getContentPane().add(emptyLabel);
  15.  
  16.             // Step 04. Size the frame.
  17.         frame.pack();
  18.  
  19.             // Step 05. Show it.
  20.         frame.setVisible(true);
  21.     }
  22. }
  23.  
That doesn't make sense: why *has* your JFrame another JFrame? That is not
an applicable example.

kind regards,

Jos
Aug 31 '07 #9
r035198x
13,262 8TB
see following code for understanding basic concept only
Expand|Select|Wrap|Line Numbers
  1. import javax.swing.*;
  2.  
  3. public class JFrame01 extends JFrame {
  4.     public static void main(String args[])     {
  5.         JLabel emptyLabel = new JLabel("  ");
  6.  
  7.              // Step01    Create a object of Frame class
  8.         JFrame frame = new JFrame(" JFrame ");
  9.  
  10.             // Step 02   when the frame is closes
  11.         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  12.  
  13.             // Step 03  Create components and put them in the frame.
  14.         frame.getContentPane().add(emptyLabel);
  15.  
  16.             // Step 04. Size the frame.
  17.         frame.pack();
  18.  
  19.             // Step 05. Show it.
  20.         frame.setVisible(true);
  21.     }
  22. }
  23.  
And what has this to do with adding a progress bar on the system tray?
Aug 31 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: King W.Wang | last post by:
Hi Java gurus, I've copied the following program from the book "Java by Examples". It compiles well with javac. But it does not run as expected. EXPECTED: It is expected that, when you input...
0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
0
by: Dominique | last post by:
I am trying to communicate to a prolog server from a java client, however even though the connection is successfully made every time I try to perform QueryExecute I get an error, either Socket...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
4
by: JNeko | last post by:
hello all, I have tried my hand at this for a couple hours but no luck. I am using JCreator. I used these two links for reference: http://www.tech-recipes.com/java_programming_tips1265.html...
3
by: coffeetime | last post by:
Hi, I just decided to learn java, so I'm quite a noob. I use the book learning java third edition. have JDK 1.6 program in notepad. I have made the simple HelloJava example, and now i wanted to...
5
by: prakashturkar | last post by:
Hi, I am Prakash.... I have tried to print an MS Word file using the basic print utilities provided in JAVA.But while asking for printing through my own code i am getting proble for example..."The...
3
by: ohadr | last post by:
hi, i get Exception in thread "main" java.lang.NullPointerException when i run my application. the exact error is: "Exception in thread "main" java.lang.NullPointerException at...
1
by: HxRLxY | last post by:
I have a program that shows a thumbnail of an image. If the user clicks on the thumbnail a new JFrame is opened that shows the full size image. If the image is larger than the screen, it gets...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.