• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Java GUI Creation

Does anyone else hate it? I'm not picking on Java specifically.

I just created the non-gui part of an internal multicast messenger for work - but connecting it to a decent looking GUI is a complete hassel.

Tips and tricks?
 
Personally, I've found Java the easiest language to create a GUI in. But I've had trouble getting into other APIs. (Like I've said before, learning languages is easy; learning APIs is hard.) Can anyone recommend other, easier GUI APIs to learn?

As for suggestions, how about going half way? Just make a large TextArea, and then print to it with a class like this:

import java.io.*;
import java.awt.TextArea;

// Allow println-ing to a TextArea.
public class TextAreaOutputStream extends OutputStream {
TextArea ta;
public TextAreaOutputStream(TextArea a) {
ta = a;
}
public void write(int c) {
// String() only takes byte[], so this is less efficient!
byte b[] = new byte[1];
b[0] = (byte)c;
write(b);
}

public void write(byte[] b) {
ta.append(new String(b));
}
public void write(byte[] b, int offset, int length) {
ta.append(new String(b, offset, length));
}
}

(I hereby place this class in the public domain, if there's any issue.)
 
I've found myself growing attached to Swing. I haven't had the opportunity to use SWT on a decent size application, maybe I will try to apply it on a personal project.
 
Originally posted by: Ken_g6
Personally, I've found Java the easiest language to create a GUI in. But I've had trouble getting into other APIs. (Like I've said before, learning languages is easy; learning APIs is hard.) Can anyone recommend other, easier GUI APIs to learn?

C# GUIs are similar to Java (if you've built a Swing app you'll feel right at home), but their layouts are far easier to manage than Java's cryptic layout managers.
 
Originally posted by: MrChad
Originally posted by: postmortemIA
Get NetBeans 5.5, GUI development is mediocre, but best that you can get for free.

Eclipse also has a visual editor, although I've never used it.

It is horrible, glad you didn't use it. with NetBeans you could actually make reasonable good GUi. with eclipse optional plug-in, you can only pull your hair.

It is common that people use NetBeans just to make forms, and then do everything else in Eclipse. Eclipse has nice features that are smartly put together, and runs well, while NetBeans is resource hog and not as refined.

But that is as much as you can expect from a free product. Visual Studio does much better job in pretty much every aspect.
 
I used net beans before for making GUI. Most of the time its better to code it by hand as the editor dont aways do what you want.
 
Back
Top