代码搜索:Getting
找到约 2,749 项符合「Getting」的源代码
代码结果 2,749
www.eeworm.com/read/127767/14335946
txt e682. getting the dimensions of a printed page.txt
Note that (0, 0) of the Graphics object is at the top-left of the actual page, which is outside the printable area.
public int print(Graphics g, PageFormat pf, int pageIndex) {
// The a
www.eeworm.com/read/127767/14335951
txt e060. getting the name of a class object.txt
// Get the fully-qualified name of a class
Class cls = java.lang.String.class;
String name = cls.getName(); // java.lang.String
// Get the fully-qualified name of a inner c
www.eeworm.com/read/127767/14335982
txt e063. getting the superclass of a class object.txt
Class cls = java.lang.String.class;
Class sup = cls.getSuperclass(); // java.lang.Object
cls = java.lang.Object.class;
sup = cls.getSuperclass(); // null
// The
www.eeworm.com/read/127767/14336015
txt e867. getting and setting a look and feel.txt
// Get the currently installed look and feel
LookAndFeel lf = UIManager.getLookAndFeel();
// Install a different look and feel; specifically, the Windows look and feel
try {
www.eeworm.com/read/127767/14336130
txt e662. getting the color model of an image.txt
// This method returns the color model of an image
public static ColorModel getColorModel(Image image) {
// If buffered image, the color model is readily available
if (image ins
www.eeworm.com/read/127767/14336292
txt e159. getting bytes from a bytebuffer.txt
A ByteBuffer has a capacity that determines how many bytes it contains. This capacity can never change. Any byte in the buffer can be retrieved using the absolute version of get(), which takes an inde
www.eeworm.com/read/127767/14336356
txt e118. getting the methods of a class object.txt
There are three ways of obtaining a Method object from a Class object.
Class cls = java.lang.String.class;
// By obtaining a list of all declared methods.
Method[] methods = cls.
www.eeworm.com/read/127767/14336434
txt e833. getting the tabs in a jtabbedpane container.txt
This example retrieves all the tabs in a tabbed pane:
// To create a tabbed pane, see e828 Creating a JTabbedPane Container
// Get number of tabs
int count = pane.getTabCount();
www.eeworm.com/read/127767/14336452
txt e017. getting the parents of a filename path.txt
// Get the parent of a relative filename path
File file = new File("Ex1.java");
String parentPath = file.getParent(); // null
File parentDir = file.getParentFile(); // null
www.eeworm.com/read/127767/14336462
txt e137. getting an image from a url.txt
try {
// Create a URL for the image's location
URL url = new URL("http://hostname:80/image.gif");
// Get the image
java.awt.Image image = java.awt.Toolkit.get