Two Laptop Bag*
The moose likes Swing / AWT / SWT and the fly likes Swing has Swung -- a substitute for my buttons? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Swing has Swung -- a substitute for my buttons?" Watch "Swing has Swung -- a substitute for my buttons?" New topic
Author

Swing has Swung -- a substitute for my buttons?

Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
I've been using Netbeans for about three years in developing a GUI project.

Now, as of version 7.0 they will no longer support my buttons and JFrames and such.

Is there a product of GUI buttons, checkboxes and such which is an upgrade of swing, or must I rework the whole >blank, blank< GUI interface again?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
the joys of giving control to a 'gui-builder'
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

I've also used NetBeans GUI builder in a project, but quickly begun to dislike it. I've removed all the "form" files from project (so it was no longer recognized as a GUI builder form) and gradually rewritten each form when it needed an update. Worth the effort if you ask me.
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
Hello Martin,

If you need a form then you need a form. There was a time 12 or so years ago when they had something called "Widgets", a package to use in C++ programs.
Is there anything like this on the market? If your app needs a form and only Swing offers it then why did netbeans drop the Swing stuff?
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4338
    
    7

I'm a little confused here, because as far as I can tell Netbeans 7 still supports Swing: http://netbeans.org/features/java/swing.html

What am I missing?
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
About 7 I should say.
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

It seems I didn't express myself very clearly. I was trying to suggest to stop using the GUI builder. In this case it is necessary to remove the *.form files from the project, otherwise you'll clash with Netbeans if you try to modify the generated code. You can leave the actual source code untouched as long as you don't need to modify them, and rewrite them only when you need to modify the layout significantly, so maybe you'd be able to spread the overhead over a time long enough not to break your existing schedule.

I don't understand exactly the problem you face with the GUI builder, and I'm afraid I wouldn't be able to help anyway, my affair with the builder was fairly short. Sorry to disappoint.
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
The thing is this :

if I upgrade Netbeans beyond where I have it now 7.0.1 or some such, then I won't be able to modify my GUI.

And I want to modify my GUI every week or so.

If I upgrade Netbeans then what can I do if I want to write a GUI app with a big fat blue button in the middle of the window???
Have the people at Netbeans gone blind?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I think you will find that a lot of people in the Swing forum are supporters of writing their GUIs by hand, without using a GUI builder.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
I'm sorry Rob, but what do you mean by

"writing their GUIs by hand, without using a GUI builder"

Writing by hand....? Do you mean that horrible "you on the right, you on the left, and the rest of you hug the lower margin" stuff?

On the market are there other options, such as seperate, independent GUI builders?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

I meant using layout managers the way they are supposed to be used - BorderLayout, FlowLayout, GridLayout, etc.
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
In other words I must do it the more difficult way. Seems like a philosophical step backwards.

Are there any "GUI Layout Managing for Dummies" - products out there?
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

This could be a good starting point.
Dave Elwood
Ranch Hand

Joined: Dec 27, 2002
Posts: 84
Thanks for the tip Martin.

So, as the chinese cook said, I'll take a wok at it.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Dave Elwood wrote:In other words I must do it the more difficult way.

I'd say that for anything more than a demo mock-up, hand-coding is the *easier* way.


luck, db
There are no new questions, but there may be new answers.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

NetBeans hasn't stopped shipping the GUI editor...so, I don't understand what the problem is...

Dave Elwood wrote:Have the people at Netbeans gone blind?

Why don't you post the problem in the NetBeans forum?


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Ranganathan Kaliyur Mannar wrote:NetBeans hasn't stopped shipping the GUI editor...so, I don't understand what the problem is...

Dave Elwood wrote:Have the people at Netbeans gone blind?

Why don't you post the problem in the NetBeans forum?


Sometimes Netbeans doesn't support GUI built using old versions. I think that is his issue. One of my teacher was used to use netbeans for GUI build, and she is still with netbeans 5.0 because her GUI will go mad if she upgraded it.

I agree with others about writing GUI by hand. I asked about this question from my lecturer too, he said automated building doesn't follow some good programming principles. To me, coding is more flexible than using automated creation.


Are you better than me? Then please show me my mistakes..
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Just use Netbeans as a RICH TEXT EDITOR
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

Yohan Weerasinghe wrote:Sometimes Netbeans doesn't support GUI built using old versions. I think that is his issue.


oh ok...
Archana Honnavalli
Ranch Hand

Joined: Feb 26, 2008
Posts: 39
I too used Netbeans to create my screens.
Later lost my .form file as we forgot to check in these files in repository.

Now we just need to used the form as is without any GUI change.

If we need GUI change then recreate the form and merge the code that has logic for every event.
Tough job

Need to check working with Layout Manager as Martin Vajsar said for further updates.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Swing has Swung -- a substitute for my buttons?
 
Similar Threads
How to make globally defined buttons, textfields, known inside separate class files?
Urly bird find method: are search criteria "and"- or "or"-composed?
Sash
GUI Help please
Swing MockUp