Skip to main content



      Home
Home » Newcomers » Newcomers » SWT text entry - a trivial query(How to collect text from a text field)
SWT text entry - a trivial query [message #1386783] Fri, 20 June 2014 08:28 Go to next message
Eclipse UserFriend
I am running a very simple PHP program on my home server
to enter medical data (Blood pressure, etc) into a MySQL table.
I was thinking of setting up a Java client program as an alternative.
I've found the JDBC part straightforward,
but surprisingly I have found what I took to be the trivial part,
namely creating a form to enter the data,
surprisingly difficult.

I'm using Eclipse, so I assume that I should use SWT.
So I am looking for a sample SWT program
which simply shows about 10 labelled text fields ("Systolic", etc),
into which data can be entered,
with a button to press when the data is complete.
It would be nice, but not necessary,
if pressing TAB passed control to the next text field
(as PHP does automatically).

So if anyone can point me to a simple SWT program
which does that, and nothing more, I should be most grateful.
Re: SWT text entry - a trivial query [message #1386824 is a reply to message #1386783] Fri, 20 June 2014 18:33 Go to previous messageGo to next message
Eclipse UserFriend
On 06/20/2014 07:11 AM, Timothy Murphy wrote:
> I am running a very simple PHP program on my home server
> to enter medical data (Blood pressure, etc) into a MySQL table.
> I was thinking of setting up a Java client program as an alternative.
> I've found the JDBC part straightforward,
> but surprisingly I have found what I took to be the trivial part,
> namely creating a form to enter the data,
> surprisingly difficult.
>
> I'm using Eclipse, so I assume that I should use SWT.
> So I am looking for a sample SWT program
> which simply shows about 10 labelled text fields ("Systolic", etc),
> into which data can be entered,
> with a button to press when the data is complete.
> It would be nice, but not necessary,
> if pressing TAB passed control to the next text field
> (as PHP does automatically).
>
> So if anyone can point me to a simple SWT program
> which does that, and nothing more, I should be most grateful.

The Standard Widget Toolkit is a graphical toolkit for use with Java.

If all you're looking for is to write a simple Java client (not a web
application), SWT should work for you. However, like most GUI
frameworks, SWT has an initial, steep learning curve. I suggest you find
a tutorial to follow. That will get you started. How about this one?

http://www.vogella.com/tutorials/SWT/article.html

There are probably many others, Google is your friend.
Re: SWT text entry - a trivial query [message #1386888 is a reply to message #1386783] Sun, 22 June 2014 10:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Timothy,

You only need to use SWT if you are writing an eclipse plugin.

If you are simply developing your program using eclipse as the IDE you can use anything you like (including SWT).

You will find there is more information and examples available for Java Swing than SWT. If this is all new I would take a look at that first.

In particular there is a tutorial trail on the Oracle Java web site.

Rob
Re: SWT text entry - a trivial query [message #1387008 is a reply to message #1386888] Mon, 23 June 2014 09:31 Go to previous message
Eclipse UserFriend
Also note that there is a dedicated SWT forum group. Specific questions about SWT will get more attention there than in this Newcomers group.
Previous Topic:Project name
Next Topic:Cannot inject update-sites, cannot find the correct config?
Goto Forum:
  


Current Time: Mon Jun 23 06:32:24 EDT 2025

Powered by FUDForum. Page generated in 0.30734 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top