package elo330;

import BluetoothServer.bluetoothServer;
import Interfaz.MainPanelBluetooth;
import Interfaz.MainPanelWifi;
import WifiServer.ConectionManager;
import WifiServer.ServeClient;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

/**
 *
 * @author Jose
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        JFrame main = new JFrame("Administrador de dispositivos móviles");
        JTabbedPane tabbedPane = new JTabbedPane();
        MainPanelWifi mpw = new MainPanelWifi();
        MainPanelBluetooth mpb = new MainPanelBluetooth();

        tabbedPane.addTab("Equipos Wifi", mpw);
        tabbedPane.addTab("Equipos Bluetooth", mpb);

        ConectionManager cm = new ConectionManager(mpw);
        bluetoothServer bt = new bluetoothServer(mpb);
        bt.setBluetooth();
        bt.start();

        main.setSize(600, 350);
        main.add(tabbedPane);
        main.setVisible(true);
        main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        cm.start();

    }
}
