0

Hi,

I have a GUI with a JTabbedPane. In the tabbedpane I used a JScrollPane to hold a JTextPane. How can I get the object name of JTextPane that I have created in my class or something which is unique for a jcomponent with which I can identify that the selected pane is the one I needed?....

Is there any method for that in Java?

Can anybody help me in this issue.... Its urgent... Plzzzzzzzz

Thanks in advance....

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Janu Sam
1

What in your terminoly is an "object name"

tabbedPane.getSelectedIndex() will tell you which pane is visible

0

What in your terminoly is an "object name"

tabbedPane.getSelectedIndex() will tell you which pane is visible

According to my requirement, I am using three JTextPanes naming jTextPane1 for showing static data, jTextPane2 for showing vbscript and jTextPane3 for another purpose. Now a new requirement come to me that the txtpane for showing static data means, jTextPane2, should be editable at certain condition. And also that must be saved. Now the problem arises. Is there any way to get the name "jTextPane2" to identify the textPane I needed....

I have used the solution you have send to me earlier. But it not works perfectly for me...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.