• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with JEditor Pane while resizing the frame  RSS feed

 
sidharth sarath
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , i am new to java GUI programming. i am adding a JEditor pane (with HTML text ) inside a JScrollPane and added the scroll pane to a JFrame.The problem is when i re size the frame the JEditor pane vanishes.

Any one help me ?

Following is the code :

 
Brian Cole
Author
Ranch Hand
Posts: 949
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sidharth sarath wrote:Hi , i am new to java GUI programming. i am adding a JEditor pane (with HTML text ) inside a JScrollPane and added the scroll pane to a JFrame.The problem is when i re size the frame the JEditor pane vanishes.

Any one help me ?

If you're new to Swing, I'd recommend avoiding GridBagLayout when possible. I certainly do, and I'm an old pro.

That said, it will probably work better for you if you adjust your weights. Try weighting your scroll pane much more heavily than the other panel.
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Learn proper Java naming conventions. All text books and tutorials I've ever seen follow the standards so don't make up your own. Variable names do not start with an upper case character.

Also when posting code use the "Code" button so the posted code retains its formatting.

Edit your posting and fix the above problems and then maybe someone will look at the question.
 
Rob Camick
Ranch Hand
Posts: 2801
15
 
Campbell Ritchie
Marshal
Posts: 55768
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Agree with Rob Camick that cross-posting should be reported here, and on the stackoverflow forum site.
 
sidharth sarath
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
i got the answer from ..please find : StackOverflow
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!