import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class Hintergrund extends JApplet implements ActionListener
{
//Farben definieren
Color dunkelblauCOLOR= new Color(16, 0, 127);
Color mittelblauCOLOR= new Color(205, 217, 239);
Color hellblauCOLOR= new Color(240, 244, 247);
Color grauCOLOR= new Color(230, 230, 230);
Color backCOLOR= new Color(255, 255, 255);
//Variablem für Anzeige definieren
String tempAktVar="",preAktVar="",windAktVar="",airAktVar="",lightAktVar="";
String tempProgVar="",preProgVar="",windProgVar="",airProgVar="",lightProgVar="";
//Grafiken laden
Icon prognosis = new ImageIcon("prognosisButton.jpg");
ImageIcon back = new ImageIcon("BACKGROUND.jpg");
ImageIcon windroseAkt = new ImageIcon("Nord.gif");
ImageIcon windroseProg = new ImageIcon("Nord.gif");
//Button definieren
JButton prognosisButton = new JButton(prognosis);
//Textfelder anlegen
JTextField tempAkt;
JTextField preAkt;
JTextField windAkt;
JTextField airAkt;
JTextField lightAkt;
JTextField tempProg;
JTextField preProg;
JTextField windProg;
JTextField airProg;
JTextField lightProg;
public void paint(Graphics g){
//Eingebundene Grafiken
super.paintComponents(g);
back.paintIcon(this,g,0,0);
prognosis.paintIcon(this,g,600,534);
windroseAkt.paintIcon(this,g,277,426);
windroseProg.paintIcon(this,g,682,426);
}
public void init(){
Container hintergrundContainer = getContentPane();
hintergrundContainer.setBackground(backCOLOR);
hintergrundContainer.setLayout(null);
prognosisButton.setBorderPainted(false);
prognosisButton.addActionListener(this);
prognosisButton.setBounds(600,534,184,50);
tempAkt = new JTextField(tempAktVar);
tempAkt.setEditable(false);
tempAkt.setBackground(backCOLOR);
tempAkt.setForeground(dunkelblauCOLOR);
tempAkt.setHorizontalAlignment(JTextField.RIGHT);
tempAkt.setFont(new Font("Arial",Font.BOLD, 14));
tempAkt.setBorder(null);
tempAkt.setBounds(118,337,68,25);
preAkt = new JTextField(preAktVar);
preAkt.setEditable(false);
preAkt.setBackground(backCOLOR);
preAkt.setForeground(dunkelblauCOLOR);
preAkt.setHorizontalAlignment(JTextField.RIGHT);
preAkt.setFont(new Font("Arial",Font.BOLD, 14));
preAkt.setBorder(null);
preAkt.setBounds(118,392,68,25);
windAkt = new JTextField(windAktVar);
windAkt.setEditable(false);
windAkt.setBackground(backCOLOR);
windAkt.setForeground(dunkelblauCOLOR);
windAkt.setHorizontalAlignment(JTextField.RIGHT);
windAkt.setFont(new Font("Arial",Font.BOLD, 14));
windAkt.setBorder(null);
windAkt.setBounds(118,447,68,25);
airAkt = new JTextField(airAktVar);
airAkt.setEditable(false);
airAkt.setBackground(backCOLOR);
airAkt.setForeground(dunkelblauCOLOR);
airAkt.setHorizontalAlignment(JTextField.RIGHT);
airAkt.setFont(new Font("Arial",Font.BOLD, 14));
airAkt.setBorder(null);
airAkt.setBounds(291,337,68,25);
lightAkt = new JTextField(lightAktVar);
lightAkt.setEditable(false);
lightAkt.setBackground(backCOLOR);
lightAkt.setForeground(dunkelblauCOLOR);
lightAkt.setHorizontalAlignment(JTextField.RIGHT);
lightAkt.setFont(new Font("Arial",Font.BOLD, 14));
lightAkt.setBorder(null);
lightAkt.setBounds(291,392,68,25);
tempProg = new JTextField(tempProgVar);
tempProg.setEditable(false);
tempProg.setBackground(backCOLOR);
tempProg.setForeground(dunkelblauCOLOR);
tempProg.setHorizontalAlignment(JTextField.RIGHT);
tempProg.setFont(new Font("Arial",Font.BOLD, 14));
tempProg.setBorder(null);
tempProg.setBounds(525,337,68,25);
preProg = new JTextField(preProgVar);
preProg.setEditable(false);
preProg.setBackground(backCOLOR);
preProg.setForeground(dunkelblauCOLOR);
preProg.setHorizontalAlignment(JTextField.RIGHT);
preProg.setFont(new Font("Arial",Font.BOLD, 14));
preProg.setBorder(null);
preProg.setBounds(525,392,68,25);
windProg = new JTextField(windProgVar);
windProg.setEditable(false);
windProg.setBackground(backCOLOR);
windProg.setForeground(dunkelblauCOLOR);
windProg.setHorizontalAlignment(JTextField.RIGHT);
windProg.setFont(new Font("Arial",Font.BOLD, 14));
windProg.setBorder(null);
windProg.setBounds(525,447,68,25);
airProg = new JTextField(airProgVar);
airProg.setEditable(false);
airProg.setBackground(backCOLOR);
airProg.setForeground(dunkelblauCOLOR);
airProg.setHorizontalAlignment(JTextField.RIGHT);
airProg.setFont(new Font("Arial",Font.BOLD, 14));
airProg.setBorder(null);
airProg.setBounds(699,337,68,25);
lightProg = new JTextField(lightProgVar);
lightProg.setEditable(false);
lightProg.setBackground(backCOLOR);
lightProg.setForeground(dunkelblauCOLOR);
lightProg.setHorizontalAlignment(JTextField.RIGHT);
lightProg.setFont(new Font("Arial",Font.BOLD, 14));
lightProg.setBorder(null);
lightProg.setBounds(699,392,68,25);
hintergrundContainer.add(prognosisButton);
hintergrundContainer.add(tempAkt);
hintergrundContainer.add(preAkt);
hintergrundContainer.add(windAkt);
hintergrundContainer.add(airAkt);
hintergrundContainer.add(lightAkt);
hintergrundContainer.add(tempProg);
hintergrundContainer.add(preProg);
hintergrundContainer.add(windProg);
hintergrundContainer.add(airProg);
hintergrundContainer.add(lightProg);
}
public void actionPerformed(ActionEvent e) {
}
}