/* test @bug6525850 @summaryIconifiedframegetsshownafterpack() @authoranthony.petrov@...:area=awt.toplevel @runapplet/manual=yesnoShownOnPack.html
*/
/** *ShownOnPack.java * *summary:
*/
import java.applet.Applet; import java.awt.*;
publicclass ShownOnPack extends Applet
{ //Declare things used in the test, like buttons and labels here
Frame f;
publicvoid init()
{ //Create instructions for the user here, as well as set up // the environment -- set the layout manager, add buttons, // etc. this.setLayout (new BorderLayout ());
String[] instructions =
{ "This test creates an invisible and iconified frame that should not become visible.", "If you observe the window titled 'Should NOT BE SHOWN' in the taskbar, press FAIL,", "else press PASS"
};
Sysout.createDialogWithInstructions( instructions );
}//End init()
publicvoid start ()
{ //Get things going. Request focus, set size, et cetera
setSize (200,200);
setVisible(true);
validate();
//What would normally go into main() will probably go here. //Use System.out.println for diagnostic messages that you want // to read after the test is done. //Use Sysout.println for messages you want the tester to read.
f = new Frame("Should NOT BE SHOWN");
f.setExtendedState(Frame.ICONIFIED);
f.pack();
}// start()
//The rest of this class is the actions which perform the test...
//Use Sysout.println to communicate with the user NOT System.out!! //Sysout.println ("Something Happened!");
}// class ShownOnPack
/* Place other classes related to the test after this line */
TextArea instructionsText;
TextArea messageText; int maxStringLength = 80;
//DO NOT call this directly, go through Sysout public TestDialog( Frame frame, String name )
{ super( frame, name ); int scrollBoth = TextArea.SCROLLBARS_BOTH;
instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth );
add( "North", instructionsText );
//DO NOT call this directly, go through Sysout publicvoid printInstructions( String[] instructions )
{ //Clear out any current instructions
instructionsText.setText( "" );
//Go down array of instruction strings
String printStr, remainingStr; for( int i=0; i < instructions.length; i++ )
{ //chop up each into pieces maxSringLength long
remainingStr = instructions[ i ]; while( remainingStr.length() > 0 )
{ //if longer than max then chop off first max chars to print if( remainingStr.length() >= maxStringLength )
{ //Try to chop on a word boundary int posOfSpace = remainingStr.
lastIndexOf( ' ', maxStringLength - 1 );
//DO NOT call this directly, go through Sysout publicvoid displayMessage( String messageIn )
{
messageText.append( messageIn + "\n" );
System.out.println(messageIn);
}
}// TestDialog class
Messung V0.5 in Prozent
¤ 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.0.10Bemerkung:
(vorverarbeitet am 2026-06-10)
¤
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.