user506710
user506710

Reputation:

Creating another window for just displaying text + swing

I currently have a window frame with panels inside and am using it to run my program. Now I am in a need to display text along with running of the code side by side.

The problem with displaying it in the same window is that it minimizes the total screen area which I am using for input handling.

Thus I decided to create a dialog box and dump all the text inside.

This proved to be a bad decision as sometimes the output is really large and dialog boxes do not contain the scroll bar.

Can anyone tell me what's the best way to proceed?

I just want suggestions to what should I try and do not need any code part for it as I would like to do that on my own :)

Upvotes: 1

Views: 4769

Answers (2)

Costis Aivalis
Costis Aivalis

Reputation: 13728

You should follow tradition and use either:

  • One JFrame that will host your application and open any number of JDialogs your for your scrolling text etc.

or

  • One JFrame with any number of JInternalPanes.

JFrame is a top-level container and every application should have only one. You do not loose any functionality this way, and you stick with the standards, which will definitely make somebody's life easier in the future. Maybe your's.

Upvotes: 1

iluxa
iluxa

Reputation: 6969

Upvotes: 2

Related Questions