File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes netbeans jframe title length too short Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "netbeans jframe title length too short" Watch "netbeans jframe title length too short" New topic
Author

netbeans jframe title length too short

A. Wolf
Ranch Hand

Joined: Sep 28, 2003
Posts: 57
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

Joined: May 03, 2008
Posts: 4523
    
    5

To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.


luck, db
There are no new questions, but there may be new answers.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

The JFrame by itself, defaults to 0px x 0px. In other words, have you explicitly set the size of the frame?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
A. Wolf
Ranch Hand

Joined: Sep 28, 2003
Posts: 57
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

Joined: Jul 26, 2007
Posts: 10170
    
    8

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

Joined: May 03, 2008
Posts: 4523
    
    5

Maneesh Godbole wrote:If Netbeans lets you code by hand

Sure it does! I do it all the time
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10170
    
    8

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

Joined: Sep 28, 2003
Posts: 57
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.
 
 
subject: netbeans jframe title length too short
 
Similar Threads
Using Gui Builder with existing class in Netbeans
Multiple jFrame Netbeans App -> calling methods in one jFrame from another
Is Java used for Desktop Application in industry?
Dialog box using Netbeans
ActionPerformed happens twice...