Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

netbeans jframe title length too short

 
A. Wolf
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm using netbeans. I created a Java Application and it created a Java class that extends JFrame. In the initialization code I can see where it says

When I click Run and the Application shows, only "b" is displayed as the Window Title. If I change the name to "abc" only "a" is displayed etc.
Does anyone know how to fix this? I don't even know how to describe this problem to google...

Thanks,
Alexander
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JFrame by itself, defaults to 0px x 0px. In other words, have you explicitly set the size of the frame?
 
A. Wolf
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the replies.

I started the project on Ubuntu with NetBeans version 6.9 and am currently using 6.9.1 on Windows 7. I have tried to create a short example but can't even create the same project type as the one I did with Ubuntu. Maybe I can try creating an Example when I use the other computer again.

Maneesh, I am using the gui builder to handle the gui for me and have just tried a setSize(x,y) in the constructor after the initComponents call. Unfortunately this did not resolve the issue.

I thought someone else might have had this problem. I might just create a new project and copy the code over step by step unless someone has another idea. This is not urgent as the Title obviously does not influence functionality.

-Alexander
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A. Wolf wrote:... unless someone has another idea.


I do.
Drop the DragAndDrop style IDEs. Most of us her (especially the non newbies) prefer to hand code. If you browse the forum, you will find various threads which will explain why hand coding is the preferred way to go.

I am an Eclipse user so I cannot comment on Netbeans. If Netbeans lets you code by hand (as compared to auto generating it via the DnD tool) then I would strongly recommend you hand code.
If not, then you can use a simple text editor and compile and run your application from the command line.

Like Darryl said, there is not much we can do to help you, unless we can look at the SSCCE code
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:If Netbeans lets you code by hand

Sure it does! I do it all the time
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:
Maneesh Godbole wrote:If Netbeans lets you code by hand

Sure it does! I do it all the time

Oh ok. I wasn't aware of this.
After reading so many posts with Netbeans DnD problems, I somehow got the impression it did not support hand coding.

Just checked the latest Swing tutorial. Not surprisingly it shows how to "get started" on Swing using Netbeans DnD.
What is this world coming to
 
A. Wolf
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I don't generally use the DnD tools either I am developing non gui apps using netbeans and it has treated me well so far, so when I was asked to create a one-page-form just to search and manipulate a database, I thought it wouldn't hurt "quickly" generating the front end.
The title problem has been resolved. I ran into other problems such as the SwingX palette causing hangs, so after I removed those things and updated my IDE suddenly I was able to see the full window title...
Thanks for the input everyone.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic