4me@u 0 Newbie Poster

Hi can some body help me out with this, i was trying to display a directory list from a folder toa jlist using the following code

String st;
while( (st.length)!=-1)
{
fileName=in.readUTF();
String data[] = {fileName};
jList1=new JList(data);
}

but it only displays one file, how could i correct this please help me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.