List of usage examples for java.awt.im.spi InputMethodContext createInputMethodWindow
public Window createInputMethodWindow(String title, boolean attachToInputContext);
From source file:SimpleInputMethod.java
public void setInputMethodContext(InputMethodContext context) { inputMethodContext = context;/*www . java 2 s . c o m*/ if (statusWindow == null) { statusWindow = context.createInputMethodWindow("Simple Input Method", false); Label label = new Label(); label.setText(locale.getDisplayName()); statusWindow.add(label); label.setSize(200, 50); statusWindow.add(label); statusWindow.pack(); Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); statusWindow.setLocation(d.width - statusWindow.getWidth(), d.height - statusWindow.getHeight()); } }