tn5250j/src/org/tn5250j Connect.java,1.27,1.28

"Kenneth J. Pouncey" <[email protected]> Sat, 18 Jun 2005 09:23:17 +0000
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19205/src/org/tn5250j

Modified Files:
	Connect.java 
Log Message:
Fix selection but causeing an index out of range message on new connection add

Index: Connect.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Connect.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** Connect.java	15 Jun 2005 05:58:16 -0000	1.27
--- Connect.java	18 Jun 2005 09:23:14 -0000	1.28
***************
*** 872,875 ****
--- 872,883 ----
  			Configure.doEntry((JFrame) getParent(), null, props);
  			ctm.addSession();
+ 			// I we have only one row then select the first one so that
+ 			//   we do not get a selection index out of range problem.
+ 			if (ctm.getRowCount() == 1) {
+ 			   sessions.getSelectionModel().setSelectionInterval(
+ 						0,
+ 						0);			   
+ 			}
+ 			
  		}
  		if (e.getActionCommand().equals("REMOVE")) {



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click