Hi Mark, Testing this it seems that (at least in JDK1.5) the orientation value is indeed restricted to 0 and 1 (the constants that are defined for the orientation). JDK1.5 throws IllegalArgumentExceptions for all other values. I would suggest to follow the JDK there.
/Roman > Got an application that set the JProgressBar to an illegal value and > expected to get a horizontal bar (it looked like a programming mistake > though). We were strictly checking the input, but it seems friendlier to > document that we default to horizontal and just create a JProgressBar > for the user. > > 2006-01-30 Mark Wielaard <[EMAIL PROTECTED]> > > * javax/swing/JProgressBar.java (orientation): Always set by > constructor. > (JProgressBar(int)): Document default on 'illegal' value. > (JProgressBar(int, int, int)): Likewise and set orientation to > HORIZONTAL when 'illegal'. > (setOrientation): Likewise. > > Committed, > > Mark
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil