1
I am developing software for a video rental company with Pattern MVC (Model-view-controller) design with the Java Persistent Api Framework and XML language. My question is this: How do you put and edit title in JDesktopPane
?
Example:
I wanted to change the name from "simple" to "video rental system". How does it?
Screen source code:
package formularios;
import classes_persistencia.AcessoDAO;
import classes_registros.Acesso;
import java.awt.BorderLayout;
import java.beans.PropertyVetoException;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import classes_utilitarias.AlteraFundo;
import classes_utilitarias.GravaPosicao;
import java.awt.Color;
import java.awt.Component;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import javax.swing.JInternalFrame;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
public class FrmPrincipal extends javax.swing.JFrame {
private AcessoDAO conexaoAcesso = new AcessoDAO();
private Acesso registroAcesso = new Acesso();
private ArrayList<Acesso> registrosAcesso = new ArrayList<>();
public static int altera = 1;
public static int elimina = 1;
public static int insere = 1;
public static int cadastroAtor = 1;
public static int cadastroDiretor = 1;
public static int cadastroGenero = 1;
public static int cadastroFaixa = 1;
private Date date = new Date();
public static JInternalFrame enderecoJanelaAgenda = new JInternalFrame();
public static JInternalFrame enderecoJanelaCliente = new JInternalFrame();
public static JInternalFrame enderecoJanelaTitulo = new JInternalFrame();
public static JInternalFrame enderecoJanelaUsuario = new JInternalFrame();
public static JInternalFrame enderecoJanelaFornecedor = new JInternalFrame();
public static JInternalFrame enderecoJanelaCalendario = new JInternalFrame();
public static JInternalFrame enderecoJanelaAtores = new JInternalFrame();
public static JInternalFrame enderecoJanelaGeneros = new JInternalFrame();
public static JInternalFrame enderecoJanelaDiretores = new JInternalFrame();
public static JInternalFrame enderecoJanelaPrecos = new JInternalFrame();
public static JInternalFrame enderecoJanelaRelatorios = new JInternalFrame();
public static JInternalFrame enderecoJanelaLocacoes = new JInternalFrame();
public static JInternalFrame enderecoJanelaConfig = new JInternalFrame();
public static JInternalFrame enderecoJanelaDevolucao = new JInternalFrame();
private static String caminhoFundo = "";
public FrmPrincipal(String usuarioLogado, int nivelAcesso) throws FileNotFoundException, IOException {
initComponents();
if(nivelAcesso == 4){
}
else{
configuraAcessos(nivelAcesso);
}
File pasta= new File("c:/Singelo");
File pasta1= new File("c:/Singelo/Imagens");
pasta.mkdir();
pasta1.mkdirs();
add( mdi_principal, BorderLayout.CENTER );
FrmStatus status = new FrmStatus(usuarioLogado);
mdi_principal.add(status);
status.setVisible(true);
}
Obs: mdi_principal
is the JDesktopPane
and Frm_principal
is the JFrame
.
As it does for arrow?
– Igor Contini
@Igorcontini has a command in the answer, just add it in your Jframe class.
– user28595
What command and how do I add it? I’m a beginner yet...
– Igor Contini
@Igorcontini see if the edition improved the response.
– user28595
Now yes! Got it and thank you! :)
– Igor Contini