Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:28 Go to next message
Timothy Murphy is currently offline Timothy MurphyFriend
Messages: 1
Registered: June 2014
Junior Member
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 22:33 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

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 14:43 Go to previous messageGo to next message
Rob Blackbourn is currently offline Rob BlackbournFriend
Messages: 1
Registered: June 2014
Junior Member
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 13:31 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
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: Tue Apr 16 13:56:58 GMT 2024

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

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

Back to the top