Codigo arduino x java
import javax.swing.BorderFactory; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.JComboBox; import controller.Controller; public class FrameTela extends JFrame { private JLabel L1; private JComboBox cmbOpcoes; private String [] mensagem = {"OLÁ JAVA", "CAFÉ com java"}; private JButton Bcima, Bdireita, Besquerda, Bfrear; private ImageIcon icone = new ImageIcon("C:/Users/JulioRibeiro/Desktop/Comprovantes/xbox.jpg"); private Controller listener; public static void main(String args[]){ JFrame Janela = new FrameTela(); Janela.show(); //para fechar a janela WindowListener x = new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }; Janela.addWindowListener(x); } FrameTela(){ setTitle("Programa"); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setSize(screenSize.width, screenSize.height); setLocation(0,0); getContentPane().setBackground(new Color(255,255,255)); getContentPane().setLayout(null); L1 = new JLabel(); L1.setBounds(280,55,700,700); L1.setIcon(icone); cmbOpcoes = new JComboBox(mensagem); Bcima = new JButton(); Bcima.setBounds(495,360,30,30); Bcima.setBackground(new Color(82,88,88)); Bcima.addActionListener(listener); Besquerda = new JButton(); Besquerda.setBackground(new Color(82,88,88)); Besquerda.setBounds(460,397,30,30); Besquerda.addActionListener(listener); Bfrear = new JButton(); Bfrear.setBackground(new Color(82,88,88));