Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / December 2006

Tip: Looking for answers? Try searching our database.

please help me out

Thread view: 
Praku - 23 Dec 2006 16:44 GMT
Hi,

    I want to keep an animation to a frame in background and
labels,textboxes etc on foreground,for that what i have to do?
hiwa - 24 Dec 2006 09:09 GMT
> Hi,
>
>      I want to keep an animation to a frame in background and
> labels,textboxes etc on foreground,for that what i have to do?
public class PrakuApplication{
 JFrame frame;
 AnimPanel ap;
 JLabel label;
 JTextArea textbox;

 public PrakuApplication(){
   frame = new JFrame();

   ap = new AnimPanel();
   ap.setLayout(.....);

   label = new JLabel(.....);
   textbox = new JTextArea();

   ap.add(label);
   ap.add(textbox);

   frame.getContentPane(ap, BorderLayout.CENTER);
   frame.setBounds(.....);
   frame.setVisible(true);
 }

 public static void main(String[] args){
 }
}

class AnimPanel extends JPanel{

 public AnimPanel(){
   // use javax.swing.Timer for running
   // animation on this panel
   ...
 }

 public void paintComponent(Graphics g){
   ...
 }
}
Praku - 24 Dec 2006 17:12 GMT
hi,

     Thnx for reply can we keep any visualization as background to a
form?and in foreground textboxes ,buttons etc..please help me this is
urgent as i am working in software company they asked us to solve that
so plz help me out
> > Hi,
> >
[quoted text clipped - 39 lines]
>   }
> }
Paul Hamaker - 26 Dec 2006 10:25 GMT
Yes, since the container's paintComponent (, paintBorder) and
paintChildren are called in that order, so the child components are
painted last, on top.
--
http://javalessons.com  Paul Hamaker, SEMM
Teaching ICT since 1987


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.