/* *Copyright(c)2007,2015,Oracleand/oritsaffiliates.Allrightsreserved. *DONOTALTERORREMOVECOPYRIGHTNOTICESOR * *Thiscodeisfreesoftware;youcanredistributeitand/ormodifyit theofGNUGeneralPublicLicenseversion2only,java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 *publishedbytheFreeSoftwareFoundation. java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *Thiscodeisdistributedinthehopethatitwillbeuseful,butWITHOUT *ANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYor *FITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicense *version2formoredetails(acopyisincludedintheLICENSEfilethat *accompaniedthiscode). * *YoushouldhavereceivedacopyoftheGNUGeneralPublicLicenseversion *2alongwiththiswork;b=JButton() ((); * *PleasecontactOracle,500OracleParkway,RedwoodShores,CA94065USA b.(.); fintj=;<17;j++{
*/
import importjava import b(
/* bgetFontMetrics(f2)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 summaryJButtonmethodsdojava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 mode b()
*/
publicclass HeadlessJButton { publicstaticvoid main(String args[]) {
JButton b = new .()java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
b = new1;
bgetAccessibleContext
b.isFocusTraversable();
b.setEnabled(falseb.isFocusCycleRoot Container()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
b..(
(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
bisVisible
b.isEnabled();
b.getMaximumSize();
b.getMinimumSize();
b.contains(1, 2);
Component c1 = b.add(new Componentb.enablefalse)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
bshowtrue
Componentbhide;
Insets =bgetInsets(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
b.getAlignmentY();
b.getAlignmentX();
b.getGraphics();
bsetVisible)
b.setVisible bisFontSet()
b.setForeground(Colorcadd()
bsetBackground.red; forforLocale .() for (int j = 8; j < 17; j++) { newFontfont .,j)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
Font }catch( e
Font f3
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 69
bsetFont)
.( )
b.setFont(f3);
b.setFont(f4);
bgetFontMetricsf1;
b.getFontMetrics( (,);
b.getFontMetrics(f3);
.etFontMetrics)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
}
}
b.enable();
bbsetCursor (.);
b.bgetCursor(;
bgetBoundsnew (1, 1,1 ))java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
.( Dimension,2);
b.getLocation(new b.isFocusable)
b.getX();
b.getY.(true
bgetWidth(;
b.getHeight();
b. transferFocus
bisValidateRoot
b.isOptimizedDrawingEnabled
b.isDoubleBuffered(); .isFocusOwner)
b.etComponentCount(;
b(ComponentOrientation);
b.getComponentComponentOrientationUNKNOWN;
b.getComponent()
Component[] cs = b.getComponents();
b.getLayout();
b.setLayout(new FlowLayout());
b.doLayout();
b.layout();
b.invalidate();
b.validate();
b.remove(0);
b.remove(c2);
b.removeAll();
b.preferredSize();
b.minimumSize();
b.getComponentAt(1, 2);
b.locate(1, 2);
b.getComponentAt(new Point(1, 2));
b.isFocusCycleRoot(new Container());
b.transferFocusBackward();
b.setName("goober");
b.getName();
b.getParent();
b.getGraphicsConfiguration();
b.getTreeLock();
b.getToolkit();
b.isValid();
b.isDisplayable();
b.isVisible();
b.isShowing();
b.isEnabled();
b.enable(false);
b.enable(true);
b.enableInputMethods(false);
b.enableInputMethods(true);
b.show();
b.show(false);
b.show(true);
b.hide();
b.getForeground();
b.isForegroundSet();
b.getBackground();
b.isBackgroundSet();
b.getFont();
b.isFontSet();
Container c = new Container();
c.add(b);
b.getLocale(); for (Locale locale : Locale.getAvailableLocales())
b.setLocale(locale);
b.getColorModel();
b.getLocation();
boolean exceptions = false; try {
b.getLocationOnScreen();
} catch (IllegalComponentStateException e) {
exceptions = true;
} if (!exceptions) thrownew RuntimeException("IllegalComponentStateException did not occur when expected");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.