Showing posts with label jframe. Show all posts
Showing posts with label jframe. Show all posts

Sunday, 3 May 2020

How to move an undecorated JFrame in Java

How to move an undecorated JFrame in Java 

The first step is to create your project by clicking file at the top of your project and then click new project, you can name your project whatever you want. Create you form by right clicking the Source Packages and by selecting New JFrame Form and then drag panel component in your form.
then you will need to create a two event for your panel the Mouse Dragged and Mouse Pressed, copy paste the code below:

[java]
int xMouse;
int yMouse;
private void framedragMouseDragged(java.awt.event.MouseEvent evt) {
int x = evt.getXOnScreen();
int y = evt.getYOnScreen();

this.setLocation(x – xMouse , y – yMouse);

}

private void framedragMousePressed(java.awt.event.MouseEvent evt) {
xMouse  = evt.getX();
yMouse = evt.getY();
}


OADBTransactionImpl in Oracle Application Framework (OAF)

OADBTransactionImpl is a class in Oracle Application Framework (OAF), which is a framework for building Oracle E-Business Suite applications...