µÎ °³ÀÌ»óÀÇ Å×ÀÌºí¿¡¼­ È°¼ºÈ­ Çϳª¸¸ µÇ°Ô Çϱâ


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :¾Øµð 2000³â 5¿ù 09ÀÏ 00:16:41

ListSelectionListener lsl = new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
try
{
if(!e.getValueIsAdjusting())
{
ListSelectionModel lsm = (ListSelectionModel)e.getSource();


//int i = e.getFirstIndex();
int i = lsm.getMinSelectionIndex();
String cho = dataModel.getValueAt(i, 0).toString();
String ch = dataModel.getValueAt(i, 1).toString();
String sub = dataModel.getValueAt(i, 2).toString();


select.setText(cho + " " + ch + " " + sub);


}
}
catch(Throwable ex){}
}
};


roomTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
roomTable.setRowSelectionAllowed(true);
roomTable.setCellSelectionEnabled(true);
roomTable.getSelectionModel().addListSelectionListener(lsl);



ListSelectionListener lsl1 = new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
try
{
if(!e.getValueIsAdjusting())
{
ListSelectionModel lsm1 = (ListSelectionModel)e.getSource();


//int i = e.getFirstIndex();
int i = lsm1.getMinSelectionIndex();
String cho = dataModel1.getValueAt(i, 0).toString();
String ch = dataModel1.getValueAt(i, 1).toString();
String sub = dataModel1.getValueAt(i, 2).toString();


select.setText(cho + " " + ch + " " + sub);
}
}
catch(Throwable ex){}
}
};


roomTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
roomTable1.setRowSelectionAllowed(true);
roomTable1.setCellSelectionEnabled(true);
roomTable1.getSelectionModel().addListSelectionListener(lsl1);


ÀÌ·±½ÄÀ¸·Î µÎ°³ ÀÌ»óÀÇ Å×À̺íÀÌ ÀÖÀ» ¶§ È°¼ºÈ­(select)°¡ Çϳª ¾¿¸¸ µÇ°Ô ÇÏ´Â ¹æ¹ý Áï ÇϳªÀÇ Å×ÀÌºí ¼±ÅÃÇßÀ¸¸é ´Ù¸¥ Å×À̺íÀº ´Ù½Ã ºñÈ°¼ºÈ­ µÇ°Ô ÇØÁÖ¼¼¿ë °í¼ö´Ôµé Á¤¸» Á¤¸» ºÎŹµå¸³´Ï´Ù.


´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]