getting JComponent from JScrollPane

java India
  • 17 years ago

    Hi experts,


     Iam new to JAVA. Iam using JTabbedPane ,and inserting a tab having component like new JScrollPane(new JLabel(new ImageIcon("aishwarya_Rai.jpg","asdfadf.jpg")));


    Till now, there was no problem. Iam able to see the Image in one tab of JTabbedPane.


    after that , how to get the ImageIcon object , if we have only JTabbedPane  object.


              Suppose JTabbedPane object is jtp
               
              I tried , (JScrollPane)jtp.getComponentAt(tab_number)      , it is returning JScrollPane object, after that how to get the JLabel object and ImageIcon object from JScrollPane



    If anybody knows it, please reply to this .


    Thanx


Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor