How to make 3 JList
that connect each other?
private JList style = new JList(new String[] { "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday","Saturday","Sunday" });
private JList style2 = new JList(new String[] {"Lucy","bin"});
public void valueChanged(ListSelectionEvent evt) { updateFont();
}
public void updateFont() {
String m = (String) style.getSelectedValue();
System.out.println(m);
if(style.getSelectedValue()== "Monday")
{
style2.setListData(new String[]{"Lucy"});
String mn = (String) style2.getSelectedValue();
System.out.println(mn);
//style3.setListData(st.getTime(mn));
}
if(style.getSelectedValue()== "Tuesday")
{
style2.setListData(new String[]{"Lucy"});
}
if(style.getSelectedValue()== "Wednesday")
{
style2.setListData(st.getMovieList());
}
if(style.getSelectedValue()== "Thursday")
{
style2.setListData(st.getMovieList());
}
if(style.getSelectedValue()== "Friday")
{
style2.setListData(st.getMovieList());
}
if(style.getSelectedValue()== "Saturday")
{
style2.setListData(new String[] {"Lucy","bin"});
}
if(style.getSelectedValue()== "Sunday")
{
style2.setListData(new String[] {"Lucy","bin"});
}
repaint();