Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-23-2009, 11:49 AM
Member
 
Join Date: Jan 2009
Posts: 15
Rep Power: 0
arunkumarinfo is on a distinguished road
Thumbs down adding image in a frame(urgent)
hi,
i add an image for a frame ,that image was in my drive.now i need to run the frame in another computer ,but in that the image was not readable.how to choose the image for my frame to runn it anywhere
import java.lang.Thread;
public class welcome extends javax.swing.JFrame
{
int num;
public welcome()
{
initComponents();
setLocationRelativeTo(null);
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents()
{
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.JFrame.EXIT_O N_CLOSE);
setTitle("Welcome");
setLocationByPlatform(true);
setResizable(false);
jLabel1.setIcon(new javax.swing.ImageIcon("J:\\project\\tiens\\tiens\\welcome.JPG")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout .Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 445, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
public static void main(String args[])
{
try{
welcome w=new welcome();
w.setVisible(true);
java.lang.Thread.sleep(1000);
loading l=new loading();
l.setVisible(true);
l.iterate();
w.setVisible(false);
}catch(Exception e){}
}
private javax.swing.JLabel jLabel1;
}
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] manipulating the pixel values of an image and constructinf a new image from sruthi_2009 AWT / Swing 14 04-10-2009 09:46 AM
how i can put image in background of frame?? ahmed13 NetBeans 4 01-15-2009 06:47 PM
Problem in adding Multiple Panels at the Specific positon on frame SANDY_INDIA AWT / Swing 7 07-09-2008 01:06 AM
Converting multiple banded image into single banded image... Image enhancement archanajathan Advanced Java 0 01-08-2008 06:29 PM
Adding checkboxes on frame Java Tip Java Tips 0 12-21-2007 09:40 AM


All times are GMT +2. The time now is 11:52 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org