TO SEE THE NOTES CLICK DOWNLOAD HERE LINK
NOTES DEKHNE KE LIYE DOWNLOD HERE LINK PAR CLICK KARE
NOTES DEKHNE KE LIYE DOWNLOD HERE LINK PAR CLICK KARE
Java Tutorial, Java Study, Learn Java, Java Lab@home, Java Cycle test, Java Projects, Java Assignments, Java Notes and much more..
import java.awt.Rectangle; public class ObjectVarsAsParameters { public static void main(String[] args) { go(); } public static void go() { Rectangle r1 = new Rectangle(0,0,5,5); System.out.println("In method go. r1 " + r1 + "\n"); // could have been //System.out.prinltn("r1" + r1.toString()); r1.setSize(10, 15); System.out.println("In method go. r1 " + r1 + "\n"); alterPointee(r1); System.out.println("In method go. r1 " + r1 + "\n"); alterPointer(r1); System.out.println("In method go. r1 " + r1 + "\n"); } public static void alterPointee(Rectangle r) { System.out.println("In method alterPointee. r " + r + "\n"); r.setSize(20, 30); System.out.println("In method alterPointee. r " + r + "\n"); } public static void alterPointer(Rectangle r) { System.out.println("In method alterPointer. r " + r + "\n"); r = new Rectangle(5, 10, 30, 35); System.out.println("In method alterPointer. r " + r + "\n"); } }
Modifier and Type | Class | Description |
---|---|---|
static class | ScrollPaneLayout.UIResource | It is UI resource version of ScrollPaneLayout. |
Modifier and Type | Field | Description |
---|---|---|
protected JViewport | colHead | It is column header child. |
protected JScrollBar | hsb | It is scrollpane's horizontal scrollbar child. |
protected int | hsbPolicy | It displays policy for the horizontal scrollbar. |
protected Component | lowerLeft | This displays the lower left corner. |
protected Component | lowerRight | This displays in the lower right corner. |
protected JViewport | rowHead | It is row header child. |
protected Component | upperLeft | This component displays in the upper left corner. |
protected Component | upperRight | This component displays in the upper right corner. |
protected JViewport | viewport | It is scrollpane's viewport child. |
protected JScrollBar | vsb | It is scrollpane's vertical scrollbar child. |
protected int | vsbPolicy | It is the display policy for the vertical scrollbar. |
Modifier and Type | Method | Description |
---|---|---|
void | addLayoutComponent(String s, Component c) | It adds the specified component to the layout. |
protected Component | addSingletonComponent(Component oldC, Component newC) | It removes an existing component. |
JViewport | getColumnHeader() | It returns the JViewport object that is the column header. |
Component | getCorner(String key) | It returns the Component at the specified corner. |
JScrollBar | getHorizontalScrollBar() | It returns the JScrollBar object that handles horizontal scrolling. |
int | getHorizontalScrollBarPolicy() | It returns the horizontal scrollbar-display policy. |
JViewport | getRowHeader() | It returns the JViewport object that is the row header. |
JScrollBar | getVerticalScrollBar() | It returns the JScrollBar object that handles vertical scrolling. |
int | getVerticalScrollBarPolicy() | It returns the vertical scrollbar-display policy. |
JViewport | getViewport() | It returns the JViewport object that displays the scrollable contents. |
Modifier and Type | Class | Description |
---|---|---|
static class | SpringLayout.Constraints | It is a Constraints object helps to govern component's size and position change in a container that is controlled by SpringLayout |
Modifier and Type | Field | Description |
---|---|---|
static String | BASELINE | It specifies the baseline of a component. |
static String | EAST | It specifies the right edge of a component's bounding rectangle. |
static String | HEIGHT | It specifies the height of a component's bounding rectangle. |
static String | HORIZONTAL_CENTER | It specifies the horizontal center of a component's bounding rectangle. |
static String | NORTH | It specifies the top edge of a component's bounding rectangle. |
static String | SOUTH | It specifies the bottom edge of a component's bounding rectangle. |
static String | VERTICAL_CENTER | It specifies the vertical center of a component's bounding rectangle. |
static String | WEST | It specifies the left edge of a component's bounding rectangle. |
static String | WIDTH | It specifies the width of a component's bounding rectangle. |
Modifier and Type | Method | Description |
---|---|---|
void | addLayoutComponent(Component component, Object constraints) | If constraints is an instance of SpringLayout. Constraints, associates the constraints with the specified component. |
void | addLayoutComponent(String name, Component c) | Has no effect, since this layout manager does not use a per-component string. |
Spring | getConstraint(String edgeName, Component c) | It returns the spring controlling the distance between the specified edge of the component and the top or left edge of its parent. |
SpringLayout.Constraints | getConstraints(Component c) | It returns the constraints for the specified component. |
float | getLayoutAlignmentX(Container p) | It returns 0.5f (centered). |
float | getLayoutAlignmentY(Container p) | It returns 0.5f (centered). |
void | invalidateLayout(Container p) | It Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
void | layoutContainer(Container parent) | It lays out the specified container. |
Dimension | maximumLayoutSize(Container parent) | It is used to calculates the maximum size dimensions for the specified container, given the components it contains. |
Dimension | minimumLayoutSize(Container parent) | It is used to calculates the minimum size dimensions for the specified container, given the components it contains. |
Dimension | preferredLayoutSize(Container parent) | It is used to calculates the preferred size dimensions for the specified container, given the components it contains. |
Modifier and Type | Class | Description |
---|---|---|
static class | GroupLayout.Alignment | Enumeration of the possible ways ParallelGroup can align its children. |
class | GroupLayout.Group | Group provides the basis for the two types of operations supported by GroupLayout: laying out components one after another (SequentialGroup) or aligned (ParallelGroup). |
class | GroupLayout.ParallelGroup | It is a Group that aligns and sizes it's children. |
class | GroupLayout.SequentialGroup | It is a Group that positions and sizes its elements sequentially, one after another. |
Modifier and Type | Field | Description |
---|---|---|
static int | DEFAULT_SIZE | It indicates the size from the component or gap should be used for a particular range value. |
static int | PREFERRED_SIZE | It indicates the preferred size from the component or gap should be used for a particular range value. |
GroupLayout(Container host) | It creates a GroupLayout for the specified Container. |
Modifier and Type | Field | Description |
---|---|---|
void | addLayoutComponent(Component component, Object constraints) | It notify that a Component has been added to the parent container. |
void | addLayoutComponent(String name, Component component) | It notify that a Component has been added to the parent container. |
GroupLayout.ParallelGroup | createBaselineGroup(boolean resizable, boolean anchorBaselineToTop) | It creates and returns a ParallelGroup that aligns it's elements along the baseline. |
GroupLayout.ParallelGroup | createParallelGroup() | It creates and returns a ParallelGroup with an alignment of Alignment.LEADING |
GroupLayout.ParallelGroup | createParallelGroup(GroupLayout.Alignment alignment) | It creates and returns a ParallelGroup with the specified alignment. |
GroupLayout.ParallelGroup | createParallelGroup(GroupLayout.Alignment alignment, boolean resizable) | It creates and returns a ParallelGroup with the specified alignment and resize behavior. |
GroupLayout.SequentialGroup | createSequentialGroup() | It creates and returns a SequentialGroup. |
boolean | getAutoCreateContainerGaps() | It returns true if gaps between the container and components that border the container are automatically created. |
boolean | getAutoCreateGaps() | It returns true if gaps between components are automatically created. |
boolean | getHonorsVisibility() | It returns whether component visiblity is considered when sizing and positioning components. |
float | getLayoutAlignmentX(Container parent) | It returns the alignment along the x axis. |
float | getLayoutAlignmentY(Container parent) | It returns the alignment along the y axis. |
Dimension | maximumLayoutSize(Container parent) | It returns the maximum size for the specified container. |