Delete « Event « Java Swing Q&A





1. Delete key in GUI designer    forums.netbeans.org

Seems like in NB 7, the delete key no longer deletes an object in the GUI designer. I have to right click and choose delete from the context menu. Is there a way to restore the functionality of the delete key? Mtich

2. how to trap delete KeyEvent..    coderanch.com

Hi All, I m creating a Text Editor in Java.. I m new to Java n learnt by my own. 1> i have to redirect the keyEvent of BackSpace n delete keys.. i have successfully built the logic to redirect the back space key .. by first consuming it... But my problem is that the Delete Key event is not consuming ...

3. problem in drawing deleting a line on the click of a mouse    coderanch.com

I've modified your code to show one way to add, select, move and remove lines. import java.awt.*; import java.awt.event.*; import java.awt.geom.Line2D; import java.util.*; import java.util.List; import javax.swing.*; import javax.swing.event.MouseInputAdapter; public class OP2 extends JFrame { // Instance variables DrawingPanel imagepanel; public static void main(String[] args) { JFrame window = new OP2(); window.setVisible(true); } // constructor OP2() { //... Create contant pane, ...