Java GUI Creation

imported_Ned Flanders

Senior member
May 11, 2005
641
0
0
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?
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,284
3,905
75
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.)
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
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.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
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.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
Get NetBeans 5.5, GUI development is mediocre, but best that you can get for free.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
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.
 

Cooler

Diamond Member
Mar 31, 2005
3,835
0
0
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.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |