dcsimg
2 small Queries in SWING
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ashutosh_mishra
Posted On:   Friday, April 18, 2008 12:43 AM

Hi all, Query 1: I put a label in frm and next try to put another button but it overrides the previous. What is ther error i am making?
Query 2: I am trying to add a .bmp file as an Image in a frm but its not working[note: here the frm is able 2 get displayed and .bmp file is in the place where the src file is thr.
do help me out. bye and hv a gr8 day.


JFrame jframe1 = new JFrame("A frame");
ImageIcon imageIcon = new ImageIcon("CPic.bmp");
Image image = imageIcon.getImage();
jframe1.setIconImage(image);
jframe1.setVisible(true);


About | Sitemap | Contact