• Post Reply Bookmark Topic Watch Topic
  • New Topic

JInternalFrame - EditorFrame

 
Felipe Walker
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class MyInternalFrame which extends JInternalFrame. The It has a JPanel which has a JEditorPane.
In my Parentframe class extends JFrame I create a JDesktopPane as the content pane.
I am trying to get the text from the JEditorPane in the MyInternalFrame class from the Parentframe class.
How would I do that
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the easiest way would be to store a reference to the JEditorPane within MyInternalFrame when you create it, so that you can add a method to MyInternalFrame to get the text, and call that method from ParentFrame.
Or, it's also possible to get all the components within a container, and then iterate over them, looking for the component you're looking for (the text field in this case).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!