PDA

View Full Version : Simple Java App



alket
June 12th, 2009, 12:19 PM
http://i40.tinypic.com/219tdv6.png
Im making a simple Java app to run in Ubuntu
it contains
jTextFiled1 = "Chapter"
jTextField2 = "Verse"
jChapterButton
jVerseButton
and jList

I want it when I write to Chapter Field any number it must load an extrenal file for jList something like (im noob)
Application Directory+/Chapters/+ TextField Number+".txt"
and display it in jList

When I write to Verse Field it must select the line to jList
for example the number in Verse Field is 18 it must select the 18th line in jList

How to do that ?

p.s. Im programming it with NetBeans IDE

alket
June 12th, 2009, 01:43 PM
Common help me please
it must be a pice of cake for majority of you.

cl333r
June 12th, 2009, 01:51 PM
Please archive your project and post it here.

alket
June 12th, 2009, 01:54 PM
just a moment...

alket
June 12th, 2009, 02:00 PM
http://www.mediafire.com/download.php?xyoozwmgud2

cl333r
June 12th, 2009, 02:42 PM
1) I didn't use the GUI builder
2) I used a JTextArea instead of a JList
3) Implemented only loading the chapter you do the rest, imo it's enough to give you a good clue how to react to events, load files, etc.

I'd suggest attaching files like I did, here, not on a foreign host.

alket
June 12th, 2009, 03:29 PM
Thank you so much, your the best man, thank you thank you thank you.