473,385 Members | 1,798 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,385 software developers and data experts.

How to display numerical data on a splash page? Draw or text?

dlite922
1,584 Expert 1GB
I'm working on creating a splash page (code is below) but I'm having a hard time what's the best way to display the version number of the program.

I don't necessarily want to draw it if I don't have to.

What's the best way to approach this? Make the image the background of the window?

thanks,

Expand|Select|Wrap|Line Numbers
  1.  
  2.     public void showSplash() {
  3.  
  4.         JPanel content = (JPanel)getContentPane();
  5.         content.setBackground(Color.white);
  6.  
  7.         // Set the window's bounds, centering the window
  8.         int width = 500;
  9.         int height =340;
  10.         Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
  11.         int x = (screen.width-width)/2;
  12.         int y = (screen.height-height)/2;
  13.         setBounds(x,y,width,height);
  14.  
  15.         // Build the splash screen
  16.         JLabel label = new JLabel(new ImageIcon("src/com/echostar/ese/service_mapper/splash_v1_2.jpg"));
  17.         JLabel copyrt = new JLabel("Version 0.1 Alpha", JLabel.CENTER);
  18.         copyrt.setFont(new Font("Sans-Serif", Font.PLAIN ,12));
  19.         content.add(label, BorderLayout.CENTER);
  20.         content.add(copyrt, BorderLayout.CENTER);
  21.  
  22.         // Display it
  23.         setVisible(true);
  24.  
  25.  
  26.         // Wait a little while, maybe while loading resources
  27.         try { Thread.sleep(duration); } catch (Exception e) {}
  28.  
  29.         setVisible(false);
  30.  
  31.     }
  32.  
  33.  
Dan
Nov 22 '10 #1
1 1438
Dheeraj Joshi
1,123 Expert 1GB
Take the version info from a config file.

Regards
Dheeraj Joshi
Nov 23 '10 #2

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

Similar topics

2
by: William Starr Moake | last post by:
For an IE-based offline WYSIWYG editor I'm developing, I have added javascript to insert images as table backgrounds and to set page background color. But I can't get any script to work for setting...
16
by: juglesh | last post by:
Hello, I need to look through the text on a page and replace certain words with an image or other word something like: read document find all instances of the word "blah" change all...
1
by: Prasad More | last post by:
Hello, I am trying to write a text on Multi-page TIFF image using C# and .NET GDI+. I have written following code to do this. When I execute this code I get "Invalid Parameter User. at...
2
by: Earl Teigrob | last post by:
I have written a photo app that allows the administrator to resize photos in an admin panel above the photo on the page. When the the new size is entered, the data is saved into a datastore and the...
3
by: jason | last post by:
Hello. This one is kinda out there. I have asp.net code that will email my yahoo account a <img> like with image on the server. When I open it in yahoo I get the full image on screen. works...
2
by: Win, Pats | last post by:
Just wondering if anyone has ever seen a 3rd party component that facilitates the creation of text images. I know I can "roll my own" but was not wanting to reinvent the wheel. I searched...
1
by: Prashwee | last post by:
I have added a TabControl to my Application lately. I need to set the tab page text to bold when I change the index. I have done someting like this without any result. Can any one help me out...
5
by: getburl | last post by:
I am currently having an issue where I render 3 1k images to the page in IE when the user clicks a button. Everything works well in FF and Good Browsers et al., but in IE I have to wrap some dummy...
2
by: martin2106 | last post by:
Hi members, I was searching for a specific script and found it here. But the problem is that it works in Firefox but doesn`t work in Internet Explorer. Who has the solution to get this script...
1
by: wildman | last post by:
What property do I need to set so that I see the < and for next and prior page in my gridview. AllowPaging is true and I do see the page numbers and can select them but not the prior and next...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
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...

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.