hide the cursor

This commit is contained in:
Lucas Pleß 2012-06-15 01:05:03 +02:00
parent 92f1a7282a
commit 28989f2511
1 changed files with 9 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package de.ctdo.crashtest.gui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.*;
import java.util.List;
@ -20,6 +21,11 @@ public class MainGui extends JFrame implements IGuiControl {
setExtendedState(Frame.MAXIMIZED_BOTH);
setUndecorated(true);
setCursor(getToolkit().createCustomCursor( new BufferedImage(3, 3, BufferedImage.TYPE_INT_ARGB),
new Point(0, 0), "null"));
textWall.setCursor(getToolkit().createCustomCursor( new BufferedImage(3, 3, BufferedImage.TYPE_INT_ARGB),
new Point(0, 0), "null"));
addKeyListener(new KeyAdapter() {
@Override
public void keyTyped(KeyEvent e) {
@ -34,7 +40,7 @@ public class MainGui extends JFrame implements IGuiControl {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
for(GuiEventListener listener: listenerList) {
for (GuiEventListener listener : listenerList) {
listener.windowClosing();
}
}
@ -118,7 +124,8 @@ public class MainGui extends JFrame implements IGuiControl {
final Runnable runnable = new Runnable() {
@Override
public void run() {
extraField.setText(text + " ");
String txt = text.substring(0, Math.min(text.length(), 8));
extraField.setText(txt + " ");
}
};