by David de Almeida Bezerra Júnior

The TetrisIDE is made for programmers were able to develop applications without manual coding. But, this not means you can't type your codes inside the tool.

Below we will se a little bit of Java behind this powerful IDE and how use this.

Java behind TetrisIDE

Everything on TetrisIDE comes from Java (it is made in Java and for Java). This means that every single action made from TetrisIDE to you comes from some Java class.
Below we have a window with a button. Note the code generated by TetrisIDE:

Source code:
package tetris.javacommands.visao;

import javax.swing.JFrame;
import componentes.visao.*;

public class JFrameMain extends JFrame{
     private JTetrisButton jButton1;

     private String retorno;
     public JFrameMain getJFrameMain(){
         return this;

     public JFrameMain(){

         addWindowListener( new java.awt.event.WindowAdapter(){
             public void windowClosing(java.awt.event.WindowEvent arg0){
         setContentPane(new JTetrisPanel(null));
         setTitle("Java Commands");
         setBounds(0, 0, 200, 200);

         jButton1 = new JTetrisButton("");
         jButton1.setBounds(40, 62, 100, 25);



     public void init(){

     public String init(String retorno){
         return getReturn();

     public void fecharJanela(){

     public String getReturn(){
         return retorno;

     public void setReturn(String retorno){

Note that every window is a Java class extended from JFrame, JDialog or JInternalFrame.

Creating a project

Create a project and add a button.

Search for the Import property in the Object Inspector and perform double click.

That field contains the imports of libraries and Java classes for your window.

We will import the class JOptionPane from package javax.swing. For that, write in the property Import:

Click in OK and select the jButton1.

Perform double clique in the OnClick event from Object Inspector and add a function javaCommand with the parameter:
JOptionPane.showMessageDialog(null, "Hello World!");

Save and Run your application, clicking on the buttons in the Toolbar or typing CTRL + S and F9.

Note: We were able to work with Java code and library importations on our applications. This is very important, because this is the true freedom on development.

CopyRight © 2023 Analisa Software.All Rights Reserved.