List of usage examples for javax.swing JFrame setCursor
@Deprecated public void setCursor(int cursorType)
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); aWindow.setVisible(true);//w ww. jav a2s . c om }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); aWindow.setVisible(true);//from w w w.jav a2s. co m }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR)); aWindow.setVisible(true);//from w w w. ja v a 2 s . c o m }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); aWindow.setVisible(true);/* ww w . java2s .c o m*/ }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.CUSTOM_CURSOR)); aWindow.setVisible(true);//w w w. j av a 2 s.c o m }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR)); aWindow.setVisible(true);/*from ww w. j a v a2s. c o m*/ }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getDefaultCursor()); aWindow.setVisible(true);/*from www .j ava 2 s . co m*/ }
From source file:Main.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getDefaultCursor()); aWindow.setVisible(true);//from w ww . j a v a 2 s .c o m System.out.println(Cursor.getDefaultCursor().getName()); }
From source file:MainClass.java
public static void main(String[] args) { JFrame aWindow = new JFrame(); aWindow.setBounds(200, 200, 200, 200); aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); aWindow.getContentPane().setBackground(Color.PINK); aWindow.setVisible(true);//from w ww.j ava 2 s .com }
From source file:CreatingCursors.java
public static void main(String[] args) { JFrame aWindow = new JFrame("This is the Window Title"); Toolkit theKit = aWindow.getToolkit(); // Get the window toolkit Dimension wndSize = theKit.getScreenSize(); // Get screen size // Set the position to screen center & size to half screen size aWindow.setBounds(wndSize.width / 4, wndSize.height / 4, // Position wndSize.width / 2, wndSize.height / 2); // Size aWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); aWindow.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); aWindow.setVisible(true); // Display the window }