[quote=vinnysoft]Olá Lucas.
Não entendi sua explicação. Está meio confusa. Você pode colocar um pouco de código para entendermos melhor?
Mas adiantando uma resposta, vamos nomear a classe do formulario de classe A, e a classe NaoVisual de classe B. Você poderia tentar instanciar a classe B e passar a referência da classe A no construtor da classe B, de forma que a B armazenasse essa referencia em uma variavel de instancia dela. Assim vc teria acesso aos métodos da classe A dentro da variavel de instancia da classe B. Seria isso?
É interessante também checar os modificadores dos métodos e variáveis de instância que vc quer utilizar.
Até +![/quote]
Bom, vamos lá. Tentei fazer o que você sugeriu e não deu certo continua dando a exceção StackOverFlowError. Agora vou postar o codigo aqui. Primeiro eu crio um projeto no NetBeans chamado TesteDeInstancia, e depois crio uma classe principal chamada A, que vai ser um formulário JFrame com um JTextField e um JButton. O JTextField eu vou nomear de AreaDeTexto e o JButton eu vou chamar de Botao com o texto Aperta. Aqui está uma imagem de como está o JFrame:

E aqui está o código da classe A:
package testedeinstancia;
public class A extends javax.swing.JFrame {
B objetoB = new B();
/** Creates new form A */
public A() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
Botao = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
AreaDeTexto = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
Botao.setText("Aperta");
Botao.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
BotaoActionPerformed(evt);
}
});
AreaDeTexto.setColumns(20);
AreaDeTexto.setRows(5);
jScrollPane1.setViewportView(AreaDeTexto);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(200, Short.MAX_VALUE)
.addComponent(Botao)
.addGap(135, 135, 135))
.addGroup(layout.createSequentialGroup()
.addGap(66, 66, 66)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(168, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(31, 31, 31)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)
.addComponent(Botao)
.addGap(70, 70, 70))
);
pack();
}// </editor-fold>
// EVENTO DO BOTAO - PRESTE ATENÇÃO AQUI
private void BotaoActionPerformed( java.awt.event.ActionEvent evt ) {
objetoB.criaInstancia();
}
/**
* @param args the command line arguments
*/
public static void main( String args[] ) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for( javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels() ) {
if( "Nimbus".equals(info.getName()) ) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
}
catch( ClassNotFoundException ex ) {
java.util.logging.Logger.getLogger(A.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch( InstantiationException ex ) {
java.util.logging.Logger.getLogger(A.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch( IllegalAccessException ex ) {
java.util.logging.Logger.getLogger(A.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
catch( javax.swing.UnsupportedLookAndFeelException ex ) {
java.util.logging.Logger.getLogger(A.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new A().setVisible(true);
}
});
}
// PRESTE ATENÇÃO AQUI - METODO PUBLIC VOID PARA CONFIGURAR AREA DE TEXTO
public void setAreaDeTexto(String s) {
AreaDeTexto.setText(s);
}
// Variables declaration - do not modify
private javax.swing.JTextArea AreaDeTexto;
private javax.swing.JButton Botao;
private javax.swing.JScrollPane jScrollPane1;
// End of variables declaration
}
E agora o código da classe B que eu quero uma instancia da classe A para acessar o metodo setAreaDeTexto sem ter que declara-lo como static
package testedeinstancia;
public class B {
A obj = new A();
public void criaInstancia() {
// Se eu instanciar a classe a aqui dentro do método, o programa não da erro, porém não acontece nada. Ele não instancia e não chama o metodo.
obj.setAreaDeTexto("Modifiquei o texto");
}
}
Agora será que você e outras pessoas irão conseguir entender?