0
I need to capture the content of this Jcombo that will have door (com1, com2. etc) for in the other class print set port for printing. I’m not getting.
public class Form1 extends javax.swing.JFrame {
Imprimir imprimir;
JComboBox JComboPorta;
/**
* Creates new form Form1
*/
public Form1() {
initComponents();
public JComboBox getJComboPorta() {
return JComboPorta;
}
/// inside the Initcomponenst... initializes with the doors jComboPorta.setModel(newDefaultComboBoxModel(SerialPortList.getPortNames()));
and in the Print how-to class?
public class Imprimir {
public void imprimir_cheque() throws InterruptedException
{
SerialPort serialPort;
Form1 form1;
try
{
form1.jComboPorta.getSelectedItem();????
serialPort = new SerialPort ("COM3");