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 javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.awt.image.BufferedImage;
import java.util.*; import java.util.*;
import java.util.List; import java.util.List;
@ -20,6 +21,11 @@ public class MainGui extends JFrame implements IGuiControl {
setExtendedState(Frame.MAXIMIZED_BOTH); setExtendedState(Frame.MAXIMIZED_BOTH);
setUndecorated(true); 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() { addKeyListener(new KeyAdapter() {
@Override @Override
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
@ -118,7 +124,8 @@ public class MainGui extends JFrame implements IGuiControl {
final Runnable runnable = new Runnable() { final Runnable runnable = new Runnable() {
@Override @Override
public void run() { public void run() {
extraField.setText(text + " "); String txt = text.substring(0, Math.min(text.length(), 8));
extraField.setText(txt + " ");
} }
}; };