Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JCombo Box And JTable  RSS feed

 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

First of all I am asking this for a friend of mine.

I am not new to java. But I don’t know any thing about the java mobile toolkit.
I was able to run whets on this article.

http://developers.sun.com/techtopics/mobility/midp/articles/wtoolkit/

I will explain my requirements in normal java.

Put a JCombo box with some data taken from the data base. The user select something and click search the result is shown is a JTable
The JTable has only 2 columns
The data base is SQL Server

In normal java this is a very simple thing. I hope this is simple in micro edition as well. So if some one can tell me how to do it or give me a working code it is a big help.

Thank You
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the ComboBox is simple. There is no JTable in J2ME, now there is a product that is open source and free called J2ME Polish that can make some prettier screens and emulate a JTable.

As far as contacting a database to fill in your ComboBox, you must consider airtime. This costs the user money using up their airtime. So I would suggest either storing the data in the recordstore on the device or put the values in your code or resource. If you make the phone contact your database each time you run the application, then you are using up people's money and airtime.

Mark
 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This is a part of my friends final year project.

The full program will run on the phone simulator that comes with wireless toolkit and the database is also going to be on the same machine.

Using a demo that comes with the toolkit I was abele to create a list(similar to JCombo) user select one and some data will be shown.

But the problem is the data that is shown is coded on the java file
Actual process must be

When user select something from the list connect to database get data and show

Any kind of help is appreciated.

Thank You
 
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!