Codigo arduino x java

Disponível somente no TrabalhosFeitos
  • Páginas : 2 (272 palavras )
  • Download(s) : 0
  • Publicado : 26 de agosto de 2012
Ler documento completo
Amostra do texto
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package controller;

import javax.swing.BorderFactory;
import java.awt.*;
importjava.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 = newImageIcon("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(newColor(82,88,88));
Besquerda.setBounds(460,397,30,30);
Besquerda.addActionListener(listener);

Bfrear = new JButton();
Bfrear.setBackground(new Color(82,88,88));...
tracking img