Results 1 to 2 of 2
Thread: g.drawArrayList?
- 10-28-2012, 09:17 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 13
- Rep Power
- 0
g.drawArrayList?
Hey guys, I have an empty arrayList and the user can type into the textfield a word, click the add word button and the word will be added to an ArrayList. My problem is that I need to make it so when they press another button the list of words will be draw to the centre of the applet.
I can do this for example.
the in my paint method I can sayJava Code:String s = "banana";
but how do I do the same thing but with an arrayList? My arrayList?Java Code:g.drawString(s, xPos, yPos);
Java Code:al = new ArrayList();
also I'd rather the arrayList be printed starting at the top left going downwards.Java Code:g.draw(al, xPos, yPos); //doesn't work.
Please try to not just refer me to a generic java.docs page because I've looked through the articles already. Didn't find anything about drawing the contents of an array.
- 10-29-2012, 02:29 AM #2


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks