Enviar variavel de um public void pra outro dentro da mesma classe

Eae pessoal, seguinte eu estou criando um programa de barra de tarefas, e estou enviando as minhas variáveis de “configuração” para uma classe (GetSetConfig) e com o decorrer do programa necessitei de enviar uma das variáveis do GetSetConfig para outra classe (OutroPrograma) até ai tudo corria bem mas quando recebi a variável em OutroPrograma não consegui usar ela no Listener

Segue o Código:

JFrame Configurações:

private void SaveButtonActionPerformed(java.awt.event.ActionEvent evt) {
//Variaveis a serem enviadas para Bar
this.dispose();
GetSetConfig saveData = new GetSetConfig();
saveData.setChrome(BoxChrome.isSelected());
saveData.setMozilla(BoxMozilla.isSelected());
saveData.setExplorer(BoxExplorer.isSelected());
saveData.setOpera(BoxOpera.isSelected());
saveData.setSafari(BoxSafari.isSelected());
saveData.setOtherP(BoxOther.isSelected());
saveData.setOpacity(ChangeOpacity.isSelected());
saveData.setCor((String) ChangeColor.getSelectedItem());
//Variavel Nome do executavel
saveData.setNameOtherExe(NameExecutable.getText());

    //enviar para Bar
    Bar ExportaVariaveis = new Bar();
    ExportaVariaveis.setVisible(true);
    ExportaVariaveis.recebeVariaveis(saveData);
    
    //enviar para OutroPrograma
    OutroPrograma ExportaVariaveis2 = new OutroPrograma();
    ExportaVariaveis2.recebeVariaveis2(saveData);

}

Classe GetSetConfig:

public class GetSetConfig {

private String cor;
private String NameOtherExe;
private Boolean opacity;
private Boolean chrome;
private Boolean mozilla;
private Boolean explorer;
private Boolean opera;
private Boolean safari;
private Boolean OtherP;

Obs.: já ta criado todos os gets sets.

Classe OutroPrograma:

public class OutroPrograma implements ActionListener{

private String RecebeNameOtherExe;

public void recebeVariaveis2(Variaveis.GetSetConfig saveData) {
    
    setRecebeNameOtherExe(saveData.getNameOtherExe());
    
    
    
}


    

@Override
public void actionPerformed(ActionEvent e) {
    
    
    String comandoP = "cmd.exe /c start " + getRecebeNameOtherExe();
        
    String comando = comandoP;
   
     
    try {
        /* 
         * O método Runtime é o responsável por executar 
         * o programa que foi recebido como parametro.
         */

        Runtime.getRuntime().exec(comando);
    } catch (Exception e1) {
        e1.printStackTrace();
    }

}

Olá, explique melhor isso, pq n conseguiu?

é o getRecebeNameOtherExe()?

eu consegui receber a variavel NameOtherExe dentro da Variavel ReceberNameOtherExe, mas para que meu listener funcione eu preciso jogar o conteúdo da variavel ReceberNameOtherExe para minha String comando.

Eu tentei, mas o public void actionPerformed não “enxerga” o que tem dentro do public void recebeVariaveis2

Cara, ta confuso pacas isso. O código ta todo zoado.
Posta o código COM o problema que vc ta tendo e completo, este já ta errado só pelo fato do método getRecebeNameOtherExe() nem existir aí.

E explica melhor oq vc quer fazer na teoria. Pq é bem provável que dê pra fazer com um código bem diferente e menos gambiarra.

Esse é o código principal onde possui botões e cada botão chama um action listener para abrir um programa especifico e um dos botões só funcionará se quando o usuário informar o nome do executável nas configurações

public class Bar extends javax.swing.JFrame {
//variaveis que rebem valores
private Boolean BooleanChrome;
private Boolean BooleanMozilla;
private Boolean BooleanExplorer;
private Boolean BooleanOpera;
private Boolean BooleanSafari;
private Boolean BooleanOther;
private Boolean BooleanTransparency;
private String ColorBackground;
private String NomeExe;
public String NomeExeT;

//Recebendo Variaveis
public void recebeVariaveis(Variaveis.GetSetConfig saveData) {
    
        BooleanChrome = saveData.getChrome();
        BooleanMozilla=(saveData.getMozilla());
        BooleanExplorer=(saveData.getExplorer());
        BooleanOpera=(saveData.getOpera());
        BooleanSafari=(saveData.getSafari());
        BooleanOther=(saveData.getOtherP());
        BooleanTransparency=(saveData.getOpacity());
        ColorBackground=(saveData.getCor());
        NomeExe = (saveData.getNameOtherExe());
        
        
        //configuração de cor da barra
        if("Gray".equals(ColorBackground)){
            PainelBarra.setBackground(Color.GRAY);
        }
        if("Blue".equals(ColorBackground)){
            PainelBarra.setBackground(Color.BLUE);
        }
        if("Black".equals(ColorBackground)){
            PainelBarra.setBackground(Color.BLACK);
        }
        if("White".equals(ColorBackground)){
            PainelBarra.setBackground(Color.WHITE);
        }
        if("Green".equals(ColorBackground)){
            PainelBarra.setBackground(Color.GREEN);
        }
        if("Purple".equals(ColorBackground)){
            PainelBarra.setBackground(new java.awt.Color(102, 102, 255));
        }
        if("Red".equals(ColorBackground)){
            PainelBarra.setBackground(Color.RED);
        }
        if("Yellow".equals(ColorBackground)){
            PainelBarra.setBackground(Color.YELLOW);
        }
        if("Pink".equals(ColorBackground)){
            PainelBarra.setBackground(Color.PINK);
        }
        if("Orange".equals(ColorBackground)){
            PainelBarra.setBackground(Color.ORANGE);
        }
        
        
        //Configuração de habilitação de botão
        if(BooleanChrome == true){
            Chrome.setEnabled(true);
        }
        else{
            Chrome.setEnabled(false);
        }
        
        if(BooleanMozilla == true){
            Mozilla.setEnabled(true);
        }
        else{
            Mozilla.setEnabled(false);
        }
        
        if(BooleanExplorer == true){
            Explorer.setEnabled(true);
        }
        else{
            Explorer.setEnabled(false);
        }
        
        if(BooleanOpera){
            Opera.setEnabled(true);
        }
        else{
            Opera.setEnabled(false);
        }
        
        if(BooleanSafari){
            Safari.setEnabled(true);
        }
        else{
            Safari.setEnabled(false);
        }
        
        if(BooleanOther){
            Other.setEnabled(true);
        }
        else{
            Other.setEnabled(false);
        }
        //transparencia do Naby Bar
        if(BooleanTransparency.equals(true)){
            
            
            
        }
        
        NomeExeT = NomeExe;
    }




/**
 * Creates new form Bar
 */


public Bar() {
    initComponents();
    PainelBarra.setBackground(new Color(1.0f,1.0f,1.0f,0.0f));
    
    URL url = this.getClass().getResource("/ImagesAndIcons/globoico.png");
    Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);
    this.setIconImage(imagemTitulo);

    
   
    
    
    //Coneção com Listeners
        classeListener listener = new classeListener();
        Chrome.addActionListener(listener);
            
        classeListener2 listener2 = new classeListener2();
        Mozilla.addActionListener(listener2);
    
        classeListener3 listener3 = new classeListener3();
        Explorer.addActionListener(listener3);
            
        classeListener4 listener4 = new classeListener4();
        Opera.addActionListener(listener4);
            
        classeListener5 listener5 = new classeListener5();
        Safari.addActionListener(listener5);
        
        OutroPrograma listener6 = new OutroPrograma();
        Other.addActionListener(listener6);
        
    
       
}

    

/**
 * 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() {

    PainelBarra = new javax.swing.JPanel();
    Chrome = new javax.swing.JButton();
    Mozilla = new javax.swing.JButton();
    Explorer = new javax.swing.JButton();
    Opera = new javax.swing.JButton();
    Safari = new javax.swing.JButton();
    Other = new javax.swing.JButton();
    Configuration = new javax.swing.JButton();
    Fechar = new javax.swing.JButton();
    ButtonChangeSideLeft = new javax.swing.JButton();
    ButtonMinimize = new javax.swing.JButton();
    ButtonChangeSideRight = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JframeBar");
    setLocation(new java.awt.Point(1475, 170));
    setMaximizedBounds(new java.awt.Rectangle(0, 170, 80, 590));
    setMaximumSize(new java.awt.Dimension(80, 590));
    setUndecorated(true);
    setResizable(false);
    setSize(new java.awt.Dimension(80, 560));

    PainelBarra.setBackground(new java.awt.Color(255, 255, 255));

    Chrome.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227384_chrome.png"))); // NOI18N
    Chrome.setToolTipText("Google Chrome");
    Chrome.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Chrome.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    Mozilla.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227424_5349_-_Firefox.png"))); // NOI18N
    Mozilla.setToolTipText("Mozilla Firefox");
    Mozilla.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Mozilla.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    Explorer.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227436_Internet_Explorer.png"))); // NOI18N
    Explorer.setToolTipText("Internet Explorer");
    Explorer.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Explorer.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    Opera.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227458_opera_online_social_media.png"))); // NOI18N
    Opera.setToolTipText("Opera");
    Opera.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Opera.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    Safari.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227468_safari.png"))); // NOI18N
    Safari.setToolTipText("Safari");
    Safari.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Safari.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));

    Other.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227504_arrow_program.png"))); // NOI18N
    Other.setToolTipText("Outro Programa");
    Other.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Other.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    Other.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            OtherActionPerformed(evt);
        }
    });

    Configuration.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/1495227319_gear.png"))); // NOI18N
    Configuration.setToolTipText("Configurações");
    Configuration.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Configuration.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    Configuration.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ConfigurationActionPerformed(evt);
        }
    });

    Fechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/icon_back.png"))); // NOI18N
    Fechar.setToolTipText("Fechar Naby Bar");
    Fechar.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    Fechar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    Fechar.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            FecharActionPerformed(evt);
        }
    });

    ButtonChangeSideLeft.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/arrows left.png"))); // NOI18N
    ButtonChangeSideLeft.setToolTipText("Alterar para lado esquerdo");
    ButtonChangeSideLeft.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    ButtonChangeSideLeft.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    ButtonChangeSideLeft.setFocusable(false);
    ButtonChangeSideLeft.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    ButtonChangeSideLeft.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    ButtonChangeSideLeft.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonChangeSideLeftActionPerformed(evt);
        }
    });

    ButtonMinimize.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/Minimize Square.png"))); // NOI18N
    ButtonMinimize.setToolTipText("Minimizar");
    ButtonMinimize.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    ButtonMinimize.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    ButtonMinimize.setDisabledIcon(null);
    ButtonMinimize.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    ButtonMinimize.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonMinimizeActionPerformed(evt);
        }
    });

    ButtonChangeSideRight.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ImagesAndIcons/arrows right.png"))); // NOI18N
    ButtonChangeSideRight.setToolTipText("Alterar para lado direito");
    ButtonChangeSideRight.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
    ButtonChangeSideRight.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    ButtonChangeSideRight.setFocusable(false);
    ButtonChangeSideRight.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    ButtonChangeSideRight.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    ButtonChangeSideRight.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonChangeSideRightActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout PainelBarraLayout = new javax.swing.GroupLayout(PainelBarra);
    PainelBarra.setLayout(PainelBarraLayout);
    PainelBarraLayout.setHorizontalGroup(
        PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(PainelBarraLayout.createSequentialGroup()
            .addContainerGap()
            .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(PainelBarraLayout.createSequentialGroup()
                    .addComponent(ButtonMinimize, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(22, 22, 22)
                    .addComponent(Fechar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE))
                .addGroup(PainelBarraLayout.createSequentialGroup()
                    .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(Chrome, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(PainelBarraLayout.createSequentialGroup()
                            .addComponent(ButtonChangeSideLeft, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(ButtonChangeSideRight, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(PainelBarraLayout.createSequentialGroup()
                            .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(Mozilla, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(Explorer, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                    .addComponent(Opera, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                    .addComponent(Safari, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                    .addComponent(Other, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                                    .addComponent(Configuration, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap())))
    );
    PainelBarraLayout.setVerticalGroup(
        PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(PainelBarraLayout.createSequentialGroup()
            .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(Fechar, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(ButtonMinimize, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGap(18, 18, 18)
            .addComponent(Chrome, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Mozilla, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Explorer, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Opera, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Safari, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Other, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(18, 18, 18)
            .addComponent(Configuration, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
            .addGroup(PainelBarraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(ButtonChangeSideLeft, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(ButtonChangeSideRight, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
    );

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(PainelBarra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(PainelBarra, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    );

    getAccessibleContext().setAccessibleName("FrameBar");

    pack();
}// </editor-fold>                        

//ação botao de configurações
private void ConfigurationActionPerformed(java.awt.event.ActionEvent evt) {
Configuration c= new Configuration();
c.setVisible(true);
this.dispose();
}

Esse é o código do Jframe das configurações:

public class Configuration extends javax.swing.JFrame {

/**
 * Creates new form Configuration
 */
public Configuration() {
    initComponents();
    
    //CheckBoxes iniciar selecionados
    BoxChrome.setSelected(true);
    BoxExplorer.setSelected(true);
    BoxMozilla.setSelected(true);
    BoxOpera.setSelected(true);
    BoxOther.setSelected(true);
    BoxSafari.setSelected(true);
    
    
    URL url = this.getClass().getResource("/ImagesAndIcons/globoico.png");
    Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);
    this.setIconImage(imagemTitulo);
    
}
         
private void initComponents() {

    PanelConfiguration = new javax.swing.JPanel();
    TitleProgram = new javax.swing.JLabel();
    CancelButton = new javax.swing.JButton();
    BoxChrome = new javax.swing.JCheckBox();
    ImageAllBrowser = new javax.swing.JLabel();
    BoxMozilla = new javax.swing.JCheckBox();
    BoxExplorer = new javax.swing.JCheckBox();
    BoxOpera = new javax.swing.JCheckBox();
    BoxSafari = new javax.swing.JCheckBox();
    TitleOther = new javax.swing.JLabel();
    BoxOther = new javax.swing.JCheckBox();
    NameExecutable = new javax.swing.JTextField();
    TituloConf = new javax.swing.JLabel();
    TitleColor = new javax.swing.JLabel();
    ChangeColor = new javax.swing.JComboBox<>();
    TitleOpacity = new javax.swing.JLabel();
    SaveButton = new javax.swing.JButton();
    ChangeOpacity = new javax.swing.JCheckBox();
    HelpButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Configuração");
    setUndecorated(true);

   
        }
   
    
//Enviando parametros para a classe
private void SaveButtonActionPerformed(java.awt.event.ActionEvent evt) {                                           
    //Variaveis a serem enviadas para Bar
    this.dispose();
    GetSetConfig saveData = new GetSetConfig();
    saveData.setChrome(BoxChrome.isSelected());
    saveData.setMozilla(BoxMozilla.isSelected());
    saveData.setExplorer(BoxExplorer.isSelected());
    saveData.setOpera(BoxOpera.isSelected());
    saveData.setSafari(BoxSafari.isSelected());
    saveData.setOtherP(BoxOther.isSelected());
    saveData.setOpacity(ChangeOpacity.isSelected());
    saveData.setCor((String) ChangeColor.getSelectedItem());
    //Variavel Nome do executavel 
    saveData.setNameOtherExe(NameExecutable.getText());
    
    //enviar para Bar
    Bar ExportaVariaveis = new Bar();
    ExportaVariaveis.setVisible(true);
    ExportaVariaveis.recebeVariaveis(saveData);
    
    //enviar para OutroPrograma
    OutroPrograma ExportaVariaveis2 = new OutroPrograma();
    ExportaVariaveis2.recebeVariaveis2(saveData);

}           

Essa é a classe que recebe todas a variáveis de configurações:

public class GetSetConfig {

private String cor;
private String NameOtherExe;
private Boolean opacity;
private Boolean chrome;
private Boolean mozilla;
private Boolean explorer;
private Boolean opera;
private Boolean safari;
private Boolean OtherP;



  

public String getCor() {
    return cor;
}

/**
 * @param cor the cor to set
 */
public void setCor(String cor) {
    this.cor = cor;
}

/**
 * @return the opacity
 */
public Boolean getOpacity() {
    return opacity;
}

/**
 * @param opacity the opacity to set
 */
public void setOpacity(Boolean opacity) {
    this.opacity = opacity;
}

/**
 * @return the chrome
 */
public Boolean getChrome() {
    return chrome;
}

/**
 * @param chrome the chrome to set
 */
public void setChrome(Boolean chrome) {
    this.chrome = chrome;
}

/**
 * @return the mozilla
 */
public Boolean getMozilla() {
    return mozilla;
}

/**
 * @param mozilla the mozilla to set
 */
public void setMozilla(Boolean mozilla) {
    this.mozilla = mozilla;
}

/**
 * @return the explorer
 */
public Boolean getExplorer() {
    return explorer;
}

/**
 * @param explorer the explorer to set
 */
public void setExplorer(Boolean explorer) {
    this.explorer = explorer;
}

/**
 * @return the opera
 */
public Boolean getOpera() {
    return opera;
}

/**
 * @param opera the opera to set
 */
public void setOpera(Boolean opera) {
    this.opera = opera;
}

/**
 * @return the safari
 */
public Boolean getSafari() {
    return safari;
}

/**
 * @param safari the safari to set
 */
public void setSafari(Boolean safari) {
    this.safari = safari;
}

/**
 * @return the OtherP
 */
public Boolean getOtherP() {
    return OtherP;
}

/**
 * @param OtherP the OtherP to set
 */
public void setOtherP(Boolean OtherP) {
    this.OtherP = OtherP;
}

/**
 * @return the NameOtherExe
 */
public String getNameOtherExe() {
    return NameOtherExe;
}

/**
 * @param NameOtherExe the NameOtherExe to set
 */
public void setNameOtherExe(String NameOtherExe) {
    this.NameOtherExe = NameOtherExe;
}

}

E essa é a classe listener que preciso receber a String que o usuário escrever lá em configurações

public class OutroPrograma implements ActionListener{

private String RecebeNameOtherExe;

public void recebeVariaveis2(Variaveis.GetSetConfig saveData) {
    
    setRecebeNameOtherExe(saveData.getNameOtherExe());
    //System.out.println(getRecebeNameOtherExe());
    
    
}


    

@Override
public void actionPerformed(ActionEvent e) {
    
    GetSetConfig R = new GetSetConfig();
    
    String ComandoR = R.getNameOtherExe();
    System.out.println(ComandoR);
    String comandoP = "cmd.exe /c start " + getRecebeNameOtherExe();
        
    String comando = comandoP;
    System.out.println(comando);
     //String comando = "cmd.exe /c start notepad.exe";
    try {
        /* 
         * O método Runtime é o responsável por executar 
         * o programa que foi recebido como parametro.
         */

        Runtime.getRuntime().exec(comando);
    } catch (Exception e1) {
        e1.printStackTrace();
    }

}

/**
 * @return the RecebeNameOtherExe
 */
public String getRecebeNameOtherExe() {
    return RecebeNameOtherExe;
}

/**
 * @param RecebeNameOtherExe the RecebeNameOtherExe to set
 */
public void setRecebeNameOtherExe(String RecebeNameOtherExe) {
    this.RecebeNameOtherExe = RecebeNameOtherExe;
}

/**
 * @return the NameOtherExe
 */

}

Em resumo preciso pegar o que o usuário digitar nas configurações mandar para a classe GetSetConfig (que deu certo) e depois receber essa String na Classe OutroPrograma dentro do listener(que eu não consegui) para quando clicar no botão lá na classe principal acabe abrindo o programa especificado nas configurações.

NNNNNNN.
Em teoria quer dizer oq o programa deve fazer, isso não envolve classes, variáveis ou qualquer coisa relacionada a codificação.

desculpa não entendi o que você quis dizer