Drag and dropping controls in C# is quite cool, and upon trying JCreator LE it looks like there is none for JAVA? If I cannot drag and drop controls then does it mean I have to manually type the controls types, their position, etc?
TIA
Printable View
Drag and dropping controls in C# is quite cool, and upon trying JCreator LE it looks like there is none for JAVA? If I cannot drag and drop controls then does it mean I have to manually type the controls types, their position, etc?
TIA
Look into net beans for it's GUI builder functionality.
You don't have to 'manually type' the position. Use suitable layout managers.
db
Thank you guys, for sure I will have more questions. =)
If you don't understand Swing do not use the GUi builder!
Especially if you are planning on teaching people Java (as indicated by your previous thread).
Indeed, do not use a GUI full stop. There is no need for that if you;re doing an OO in Java course.
And this is precisely why I wrote what I did on that thread...
The experiences of those students are all in using consoles so I thought I should introduce to them some GUI, perhaps some basic textboxes and commandbuttons? I prefer that they will learn something that they can use later.
So they already know Java?
If not then you have to teach them Java first, and throwing Swing in really doesn't help.
If they do, then do not use the GUI builder. That is not a teaching tool for Swing.
Make sure they know how to find the tutorials. Pick out some good books, and pray they make your job easier by applying themselves.
A Gui builder will use components of the Swing library that a person new to Java won't be able to understand. It's not hard to learn how to hand code it all, I'm in the process of doing it myself. I built a notepad clone and a mini midi music player. Both were very fundamental on me learning how Swing works.
We have at least 20 3hour meetings, in the midterm (first 10 meetings) we shall be discussing JAVA syntax and OOP, and perhaps on the finals (last 10 meetings) we are going to try using a GUI. Hmmmnnn, I'm even contemplating on using J# so we can just drag and drop. =)
There's a nice saying "anything that can be used by monkeys will only be used by monkeys". Better study the basics of the language first and next carefully see and try how an ide may help you in your code writing job. Don't just drag and drop and see what's going to happen and most certainly don't come here afterwards and complain about "Eclipse's strange errors".
kind regards,
Jos
To have a realistic example I am planning on making a simple CRUD program with basic controls, I have been reading on Swing and gui creation now and I will be trying them out as soon as I can. For the database, I haven't done some googling yet. I supposed JAVA can connect to an Access database, is that correct? Will it be difficult doing some Insert, Update, Delete and Select Queries with JAVA?
Thanks!
JavaDB (previously known as Derby) comes free with the JDK so why don't you go with that? For Access you'll need some kind of third party JDBC driver or (:shudder:) a JDBC-ODBC connector
db
To be honest, I haven't heard JavaDB or Derby until you mentioned it. =) How about mySql or SQL Server, can Java connect to them?
Any database that has a JDBC driver (and all the main ones do, as well as all the smaller ones I know of) will connect.
Derby/JavaDB is the easiest.
Sun bundled it sneakily with their SE distribution, starting from version 1.5 (1.6?), and didn't mention much about it. I also discovered it accidentally (check your directory /Program Files/Sun if you're on a MS Windows machine). It's all there plus splendid, complete documentation. That entire Derby/JavaDB thing surprised me because Sun was officially showing off with their newly bought MySQL database ... Derby/JavaDB is easy and it's fun to work/play with.
kind regards,
Jos
ps. there's more stufff bundled with the SE distribution, there's also a HTTP server available; almost nobody knows it and I don't know what we're supposed to do with it ;-)
Hmmmnn... Why is it that it looks difficult (compared to VS) to create a GUI with Java?
Because people want to bend the functionality and visual appearance beyond recognition; all the GUI components have to be capable of doing it; the GUI also has to run cross platform and not all native GUIs (on which Swing more or less depends) are equally cooperative. But if you want to use the GUI stuff in a regular way you can forget about all its dark corners and simply use Swing; it isn't difficult then ...
kind regards,
Jos
Okay, perhaps it will be appropriate to ask this in this thread: What do you think is the best IDE for GUI development in Java? I only tried JCreator LE so far, I've downloaded Eclipse but haven't tried it yet.
It doesn't matter much as long as you build your GUIs by hand (as has been said before: NetBean's GUI builder turns out to be a mess in the hands of the unexperienced). Try a simple JFrame first with a few buttons and a few simple LayoutManagers. Your first attempt will take almost forever to complete; but your second and third etc. ones will be easier as your learn and experiment. And above all: read the API documentation for the Swing classes and study Sun's/Oracle's tutorials on the subject. You can't just plunge in and expect to have a great GUI in a couple of hours without the appropriate knowledge.
kind regards,
Jos