This site requires JavaScript, please enable it in your browser!
Greenfoot back
teng
teng wrote ...

2015/4/8

How to setup a table in greenfoot?

teng teng

2015/4/8

#
Hi, I cant seem to find a way to setup a table can someone help me?
danpost danpost

2015/4/8

#
teng wrote...
I cant seem to find a way to setup a table
Most probably, you would want to use an array. If the table values do not change, make it a 'static final' array.
teng teng

2015/4/9

#
@danpost my problem isnt the data but is there a way to build a table in greenfoot. all ive found was by using swing but greenfoot doesnt support java swing
danpost danpost

2015/4/9

#
teng wrote...
@danpost my problem isnt the data but is there a way to build a table in greenfoot. all ive found was by using swing but greenfoot doesnt support java swing
Please elaborate as to what you are trying to do. It would make it that much easier to help.
danpost danpost

2015/4/9

#
By you mentioning swing, it would appear the you want the data to be input by the user during run-time. You can use swing in greenfoot. There are several scenarios on the site the uses swing -- mostly using the JOptionPane class which can be used for simple messages, confirmations, choices, and even data input (to name the most common uses). If you would prefer not to use swing, you could create your own gui objects to gather the information for the table. With more information about the table and what kind of data and choices for that data, it may be possible to make more, or even better, suggestions as to how you could perform the data gathering.
You need to login to post a reply.