How to program different graphical interface in a labview

Hi
 i  adding different graphical inface in labview,by taking tab control in that add menu,go-online, and some function,i did this for touch screen by clicking it go on linking..I attached this i, already did  some partr in labview.I also attached ms_Paper prasentation refference  i doing this,give me the solltion how to link these slides in labview
Attachments:
temlate.vi ‏21 KB

Sham,
If English is your second language you might want to post on another forum.  I am really not sure what you are trying to do but you are telling us, "give me the sollition how to link these slides in labview"  so I'll attach a community example you may want to look at. 
https://decibel.ni.com/content/docs/DOC-34150
Also, if you are going to attach code, please do something in the block diagram.  I have almost no idea what you want to do and opening the VI did not help at all.
Matt J
Professional Googler and Kudo Addict
National Instruments

Similar Messages

  • How to print a graphical interface

    Hi , I need to print a simple user interface in java. Highly appreciate your effort.
    Thanks,
    Uthpala

    I'm assuming you mean that you want to print the contents of a user interface. Your main classes of interest are PrintJob and PrintDialog. Here's a link that might help get you started
    http://java.sun.com/products/java-media/2D/forDevelopers/sdk12print.html#pgraphics
    I went through some of this a couple of months ago and it wasn't much fun. In Java, the printer looks pretty much like a Graphics2D rendering surface and you can draw to it directly if you wish. There results are just as sharp and attractive as you wish, but it's a fair amount of work to implement appropriate code. While the API isn't spectacular, I think the real problem is just that printing is intrinsically hard.
    Supposedly, Java lets you print Swing UI components directly. I could never get this working worth an (expletive deleted).
    Also, when you first start testing your printing code, remove all but a few sheets of paper from your printer. If you don't handle the "NO_SUCH_PAGE" logic quite right, it is easy to get into a run-away print job. For that matter, be prepared to use up a lot of paper anyway just tweaking on your output.

  • How to program lpc2368 of the project in LabVIEW to hex file?

    is LabView 2008 with LabVIEW Microprocessor SDK. also is available microcontroller lpc2368. is there any example of creating a finished hex file, preferably a step by step
    thanks !
    Solved!
    Go to Solution.

    Hi Sergiv,
    I am not sure what you meant by "is LabView 2008 with LabVIEW Microprocessor SDK."
    The LPC2368 is what we call a Tier 2 device. Tier 2 devices provide processor support, but no specific palettes are provided, so this requires you to develop and integrate drivers. That being said, you might be able to use the palettes developed for the LPC2378.
    Were you able to follow the steps mentioned in the "How to CreateHexFile?" discussion forum post?
    Regards,
    Claire Reid
    National Instruments

  • Java program that create a graphic interface of the WGET program

    Hello,
    How can I make a Java program that create a graphic interface of the WGET program.
    Please post something already developed.
    No Applet.
    Thank you.

    You can use java.lang.Runtime.exec or java.lang.ProcessBuilder to execute external programs like wget. Generally you pass one of those methods an array of Strings; the first String is the name of the executable, and the rest are arguments. You get a Process object that represents the running process that you've started; you can get standard input and output streams from that Process to read output. This is probably stuff your teacher already told you...but if not, hope it helps.
    You should read this article about pitfalls around Runtime.exec:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Much of the information there also applies to ProcessBuilder.
    Good luck on your homework.

  • When I call an external program from Labview, how can I embed the interface into the front panel?

    I'm running Labiew 6i for Linux. I'm using a system exec.vi to call an external program to do image manipulation (since there is no IMAQ for linux). How can I embed the user interface of the external program into the front panel of Labview?

    As far as I know, the only way to embed other GUIs in LabView is an ActiveX in a container.
    As long as you are using Linux, try to place (moving them on the desktop ) the two windows linked (like those 3 of WinAmp).

  • Bought the Aperture program. The interface in Japanese. Thanks, very conveniently. Can will prompt how to be switched to English?

    Bought the Aperture program. The interface in Japanese. Thanks, very conveniently. Can will prompt how to be switched to English?

    Delete the Aperture app you currently have installed using this free utility >  Download AppCleaner for Mac
    Then re download Aperture using the same Apple ID you used for the original purchase. You will not be charged again. Before doing so, click the round flag icon bottom right corner of the App Store window. Make sure you see the U.S. flag. If not, click the flag icon so you can swtich to U.S.
    How to re download apps from the Mac App Store:
    Open the App Store. From the menu bar click Store > Sign In
    Click Purchases from the top of the App Store window.
    Select which apps you want to re download. Then right or control click where you see Installed  then click Install.

  • How to program with different device by NI-VISA?

    Dear NIer:
    firstly I will list my enviroment.
    SW:Labwindows/cvi 5.5/VISA/MAX.
    HW:HP pc/pci-gpib/GPIB-VXI/DD42916.
    QUESTION:
    1 MAX always think GPIB-VXI/C and DD42916 as a GPIB device.Why don't they think these devices listed above as a VXI device?
    2 Since MAX think DDC42916 as a GPIB device, and DDC42916 supports word serial communication, How can I program with this message-based device by NI-VISA?
    I searched for appropriate function in NI-VISA ref manual,but I failed.VXI WSPRotocal COMMand is not suitable here evidently.
    3 Then how can I program the other device like register-based device and memory-based device under this circumstance?
    4 if slot0 controller changed from GPIB/VXI to 1394/VXI
    ,then how to program?

    east-
    I see this question was answered (and then discussed again in depth) in the VISA forum. I'm posting these links in case anyone looks here for an answer.
    -Scot

  • How to call SAP GUI Graphical interface by using SAP ACTIVEX Control?

    Hi,all
    I want to connet my delphi system with SAP system. But we still need to call SAP GUI Graphical interface into our delphi system. Could we use SAP ACTIVEX Control to implement this funciont?
    Or, is there any other method to Call SAP GUI Graphical interface into other system?
    Besides call SAP GUI into IE by using portal
    Thanks and best regards.

    check out this thread
    Re: Calling SAPGUI transaction out of BSP application

  • How to program to interface?

    What does it mean exactly to "program to an interface"?
    I had always learned to establish an interface and then write an implementation. However, is that what programming to an interface means?

    Even if you "know" you're going to have an ArrayList,
    the code only knows that it has a List, so it should
    not be written as if it assumes a particular
    implementation.The problem with the List interface (abstraction) is that it combines the weaknesses of two common data structures: the linked list and the dynamic array.
    List has slow random accesses like a linked list and slow insertions at the beginning like a dynamic array. It should be very seldom one would prefer such a data structure.
    (There's also a RandomAccess marker
    interface, but that doesn't extend List, so, since
    you still need List's functionality, you can't just
    declare your variables to be of type RandomAccess.)RandomAccess still can be used to "cook up" an interface for a dynamic array,
    public interface RandomList<T> extends List<T>, RandomAccess {
    }Users of RandomList are guaranteed that random accesses are fast. It's easy to provide a concrete RandomList implementation like this,
    class RL<T> extends ArrayList<T> implements RandomList<T> {
    }

  • How to Switch the graphic adapter in HP DV6-7078Ca

    I want to change the graphic adapter from Intel to Nvidia because the intel is only 64 MB
    How can i switch to Nvidia which is 2GB

    FadiNasan wrote:
    I want to change the graphic adapter from Intel to Nvidia because the intel is only 64 MB
    How can i switch to Nvidia which is 2GB
    Hi,
    It's been done automatically. Go to the nVidia Control Panel and have a look at the settings. You can set each application or program to run on a different graphics card but it's been set to auto as default. Auto means that the default card is the shared Intel HD X000 for a common usage but when you start playing games or run a video editing program it will automatically swich the graphics to nVidia. The Intel shared graphics has more than 64MB of RAM. It uses the main laptop RAM so in case that you have got 8GB of RAM the Intel HD graphics could take up to 1.5GB of RAM from it. Means that the laptop reserves up to 1.5GB of RAM for the Intel card and the rest can be used by the system.
    http://ucdavistechtalk.wordpress.com/2012/05/29/how-to-switch-between-intel-graphics-and-nvidia-with...
    Dv6-7000 /Full HD/Core i5-3360M/GF 650M/Corsair 8GB/Intel 7260AC/Samsung Pro 256GB
    Testing - HP 15-p000
    HP Touchpad provided by HP
    Currently on Debian Wheeze
    *Please, help other users with the same issue by marking your solved topics as "Accept as Solution"*

  • Modify the TicTacToeServer /client from deitel How to program

    We've been given example code from the deitel & deitel book how to program and have to carry out the following alterations:
    a) Modify the TicTacToeServer class to test for a win, loss or draw on each move in the game. Send a message to each client applet that indicates the result of the game when the game is over.
    b) Modify the TicTacToeClient class to display a button that when clicked allows the client to play another game. The button should be enabled only when a game completes. Note that both class TicTacToeClient and class TicTacToeServer must be modified to reset the board and all state information. Also, the other TicTacToeClient should be notified that a new game is about to begin so its board and state can be reset.
    c) Modify the TicTacToeClient class to provide a button that allows a client to terminate the program at any time. When the user clicks the button, the server and the other client should be notified. The server should then wait for a connection from another client so a new game can begin.
    d) Modify the TicTacToeClient class and the TicTacToeServer class so the winner of a game can choose game piece X or O for the next game. Remember: X always goes first.
    So far I have only been able to do part a) of the exercise im having a lot of difficulty with part b) which allows the client to play a new game.The code ive done so far is listed below if anyone can help i would be forever greatful. Thanks
    // Fig. 18.9: TicTacToeClient.java
    // Client that let a user play Tic-Tac-Toe with another across a network.
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    public class TicTacToeClient extends JApplet implements Runnable, ActionListener {
    private JButton Button;
    private JTextField idField;
    private JTextArea displayArea;
    private JPanel boardPanel, panel2;
    private Square board[][], currentSquare;
    private Socket connection;
    private DataInputStream input;
    private DataOutputStream output;
    private char myMark;
    private boolean myTurn;
    private final char X_MARK = 'X', O_MARK = 'O';
    boolean done=false;
    Container container;
    // Set up user-interface and board
    public void init()
    container = getContentPane();
    // set up JTextArea to display messages to user
    displayArea = new JTextArea( 4, 30 );
    displayArea.setEditable( false );
    container.add( new JScrollPane( displayArea ), BorderLayout.SOUTH );
    // set up panel for squares in board
    boardPanel = new JPanel();
    boardPanel.setLayout( new GridLayout( 3, 3, 0, 0 ) );
    // create board
    board = new Square[ 3 ][ 3 ];
    // When creating a Square, the location argument to the constructor
    // is a value from 0 to 8 indicating the position of the Square on
    // the board. Values 0, 1, and 2 are the first row, values 3, 4,
    // and 5 are the second row. Values 6, 7, and 8 are the third row.
    for ( int row = 0; row < board.length; row++ ) {
    for ( int column = 0; column < board[ row ].length; column++ ) {
    // create Square
    board[ row ][ column ] = new Square( ' ', row * 3 + column );
    boardPanel.add( board[ row ][ column ] );
    // textfield to display player's mark
    idField = new JTextField();
    idField.setEditable( false );
    container.add( idField, BorderLayout.NORTH );
    Button = new JButton("New Game");
    container.add(Button, BorderLayout.BEFORE_FIRST_LINE);
    // set up panel to contain boardPanel (for layout purposes)
    panel2 = new JPanel();
    panel2.add( boardPanel, BorderLayout.CENTER );
    container.add( panel2, BorderLayout.CENTER );
    } // end method init
    // Make connection to server and get associated streams.
    // Start separate thread to allow this applet to
    // continually update its output in textarea display.
    public void start()
    // connect to server, get streams and start outputThread
    try {
    // make connection
    connection = new Socket( getCodeBase().getHost(), 12345 );
    // get streams
    input = new DataInputStream( connection.getInputStream() );
    output = new DataOutputStream( connection.getOutputStream() );
    // catch problems setting up connection and streams
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    // create and start output thread
    Thread outputThread = new Thread( this );
    outputThread.start();
    } // end method start
    // control thread that allows continuous update of displayArea
    public void run()
    // get player's mark (X or O)
    try {
    myMark = input.readChar();
    // display player ID in event-dispatch thread
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run()
    idField.setText( "You are player \"" + myMark + "\"" );
    myTurn = ( myMark == X_MARK ? true : false );
    // receive messages sent to client and output them
    while ( !done) {
    processMessage( input.readUTF() );
    } // end try
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    } // end method run
    // process messages received by client
    private void processMessage( String message )
    // valid move occurred
    if ( message.equals( "Valid move." ) ) {
    displayMessage( "Valid move, please wait.\n" );
    setMark( currentSquare, myMark );
    // invalid move occurred
    else if ( message.equals( "Invalid move, try again" ) ) {
    displayMessage( message + "\n" );
    myTurn = true;
    // opponent moved
    else if ( message.equals( "Opponent moved" ) ) {
    // get move location and update board
    try {
    int location = input.readInt();
    int row = location / 3;
    int column = location % 3;
    setMark( board[ row ][ column ],
    ( myMark == X_MARK ? O_MARK : X_MARK ) );
    displayMessage( "Opponent moved. Your turn.\n" );
    myTurn = true;
    } // end try
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    } // end else if
    else if ( message.equals("Game Over") ){
    displayMessage("fuck sake" );
    // simply display message
    else
    displayMessage( message + "\n" );
    } // end method processMessage
    // utility method called from other threads to manipulate
    // outputArea in the event-dispatch thread
    private void displayMessage( final String messageToDisplay )
    // display message from event-dispatch thread of execution
    SwingUtilities.invokeLater(
    new Runnable() {  // inner class to ensure GUI updates properly
    public void run() // updates displayArea
    displayArea.append( messageToDisplay );
    displayArea.setCaretPosition(
    displayArea.getText().length() );
    } // end inner class
    ); // end call to SwingUtilities.invokeLater
    // utility method to set mark on board in event-dispatch thread
    private void setMark( final Square squareToMark, final char mark )
    SwingUtilities.invokeLater(
    new Runnable() {
    public void run()
    squareToMark.setMark( mark );
    // send message to server indicating clicked square
    public void sendClickedSquare( int location )
    if ( myTurn ) {
    // send location to server
    try {
    output.writeInt( location );
    myTurn = false;
    // process problems communicating with server
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    // set current Square
    public void setCurrentSquare( Square square )
    currentSquare = square;
    public void actionPerformed(ActionEvent e) {
    // I need code here
    // private inner class for the squares on the board
    private class Square extends JPanel {
    private char mark;
    private int location;
    public Square( char squareMark, int squareLocation )
    mark = squareMark;
    location = squareLocation;
    addMouseListener(
    new MouseAdapter() {
    public void mouseReleased( MouseEvent e )
    setCurrentSquare( Square.this );
    sendClickedSquare( getSquareLocation() );
    } // end Square constructor
    // return preferred size of Square
    public Dimension getPreferredSize()
    return new Dimension( 30, 30 );
    // return minimum size of Square
    public Dimension getMinimumSize()
    return getPreferredSize();
    // set mark for Square
    public void setMark( char newMark )
    mark = newMark;
    repaint();
    // return Square location
    public int getSquareLocation()
    return location;
    // draw Square
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    g.drawRect( 0, 0, 29, 29 );
    g.drawString( String.valueOf( mark ), 11, 20 );
    } // end inner-class Square
    } // end class TicTacToeClient
    // Fig. 18.8: TicTacToeServer.java
    // This class maintains a game of Tic-Tac-Toe for two client applets.
    import java.awt.*;
    import java.net.*;
    import java.io.*;
    import javax.swing.*;
    public class TicTacToeServer extends JFrame {
    private char[] board;
    private JTextArea outputArea;
    private Player[] players;
    private ServerSocket server;
    private int currentPlayer;
    private final int PLAYER_X = 0, PLAYER_O = 1;
    private final char X_MARK = 'X', O_MARK = 'O';
    int moves=0;
    // set up tic-tac-toe server and GUI that displays messages
    public TicTacToeServer()
    super( "Tic-Tac-Toe Server" );
    board = new char[ 9 ];
    for (int i = 0; i<9; i++){
    board[i] = ' ';
    players = new Player[ 2 ];
    currentPlayer = PLAYER_X;
    // set up ServerSocket
    try {
    server = new ServerSocket( 12345, 2 );
    // process problems creating ServerSocket
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // set up JTextArea to display messages during execution
    outputArea = new JTextArea();
    getContentPane().add( outputArea, BorderLayout.CENTER );
    outputArea.setText( "Server awaiting connections\n" );
    setSize( 300, 300 );
    setVisible( true );
    } // end TicTacToeServer constructor
    // wait for two connections so game can be played
    public void execute()
    // wait for each client to connect
    for ( int i = 0; i < players.length; i++ ) {
    // wait for connection, create Player, start thread
    try {
    players[ i ] = new Player( server.accept(), i );
    players[ i ].start();
    // process problems receiving connection from client
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // Player X is suspended until Player O connects.
    // Resume player X now.
    synchronized ( players[ PLAYER_X ] ) {
    players[ PLAYER_X ].setSuspended( false );
    players[ PLAYER_X ].notify();
    } // end method execute
    // utility method called from other threads to manipulate
    // outputArea in the event-dispatch thread
    private void displayMessage( final String messageToDisplay )
    // display message from event-dispatch thread of execution
    SwingUtilities.invokeLater(
    new Runnable() {  // inner class to ensure GUI updates properly
    public void run() // updates outputArea
    outputArea.append( messageToDisplay );
    outputArea.setCaretPosition(
    outputArea.getText().length() );
    } // end inner class
    ); // end call to SwingUtilities.invokeLater
    // Determine if a move is valid. This method is synchronized because
    // only one move can be made at a time.
    public synchronized boolean validateAndMove( int location, int player )
    boolean moveDone = false;
    // while not current player, must wait for turn
    while ( player != currentPlayer ) {
    // wait for turn
    try {
    wait();
    // catch wait interruptions
    catch( InterruptedException interruptedException ) {
    interruptedException.printStackTrace();
    // if location not occupied, make move
    if ( !isOccupied( location ) ) {
    // set move in board array
    board[ location ] = currentPlayer == PLAYER_X ? X_MARK : O_MARK;
    // change current player
    currentPlayer = ( currentPlayer + 1 ) % 2;
    // let new current player know that move occurred
    players[ currentPlayer ].otherPlayerMoved( location );
    notify(); // tell waiting player to continue
    // tell player that made move that the move was valid
    return true;
    // tell player that made move that the move was not valid
    else
    return false;
    } // end method validateAndMove
    // determine whether location is occupied
    public boolean isOccupied( int location )
    if ( board[ location ] == X_MARK || board [ location ] == O_MARK )
    return true;
    else
    return false;
    void gameOverCheck() {
    boolean over = false;
    // Check rows
    for (int start=0; start < 9; start += 3)
    over = over || ((board[start] != ' ') &&
    (board[start] == board[start+1]) &&
    (board[start] == board[start+2]));
    // Check columns
    for (int start=0; start < 3; start++)
    over = over || ((board[start] != ' ') &&
    (board[start] == board[start+3]) &&
    (board[start] == board[start+6]));
    // Check diagonals
    over = over || ((board[0] != ' ') &&
    (board[0] == board[4]) && (board[0] == board[8]));
    over = over || ((board[2] != ' ') &&
    (board[2] == board[4]) && (board[2] == board[6]));
    if (over || (moves>=9))
    for ( int i = 0; i < players.length; i++ )
    players.gameOver(over ? (currentPlayer+1)%2 : -1 );
    public static void main( String args[] )
    TicTacToeServer application = new TicTacToeServer();
    application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    application.execute();
    // private inner class Player manages each Player as a thread
    private class Player extends Thread {
    private Socket connection;
    private DataInputStream input;
    private DataOutputStream output;
    private int playerNumber;
    private char mark;
    protected boolean suspended = true;
    boolean done = false;
    // set up Player thread
    public Player( Socket socket, int number )
    playerNumber = number;
    // specify player's mark
    mark = ( playerNumber == PLAYER_X ? X_MARK : O_MARK );
    connection = socket;
    // obtain streams from Socket
    try {
    input = new DataInputStream( connection.getInputStream() );
    output = new DataOutputStream( connection.getOutputStream() );
    // process problems getting streams
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    } // end Player constructor
    // send message that other player moved
    public void otherPlayerMoved( int location )
    // send message indicating move
    try {
    output.writeUTF( "Opponent moved" );
    output.writeInt( location );
    // process problems sending message
    catch ( IOException ioException ) {
    ioException.printStackTrace();
    void gameOver(int winner) {
    try {
    output.writeUTF( "Game Over. " +
    (( winner == -1 ) ? "No winner." :
    ( "Winner is " + ( winner == 0 ? 'X' : 'O' ) + "." ) ) );
    done=true;
    output.writeUTF("Game Over");
    } catch( IOException e ) {
    e.printStackTrace(); System.exit( 1 );
    public void run()
    // send client message indicating its mark (X or O),
    // process messages from client
    try {
    displayMessage( "Player " + ( playerNumber ==
    PLAYER_X ? X_MARK : O_MARK ) + " connected\n" );
    output.writeChar( mark ); // send player's mark
    // send message indicating connection
    output.writeUTF( "Player " + ( playerNumber == PLAYER_X ?
    "X connected\n" : "O connected, please wait\n" ) );
    // if player X, wait for another player to arrive
    if ( mark == X_MARK ) {
    output.writeUTF( "Waiting for another player" );
    // wait for player O
    try {
    synchronized( this ) {
    while ( suspended )
    wait();
    // process interruptions while waiting
    catch ( InterruptedException exception ) {
    exception.printStackTrace();
    // send message that other player connected and
    // player X can make a move
    output.writeUTF( "Other player connected. Your move." );
    while ( ! done ) {
    // get move location from client
    int location = input.readInt();
    // check for valid move
    if ( validateAndMove( location, playerNumber ) ) {
    displayMessage( "\nlocation: " + location );
    output.writeUTF( "Valid move." );
    gameOverCheck();
    else
    output.writeUTF( "Invalid move, try again" );
    // close connection to client
    } // end try
    // process problems communicating with client
    catch( IOException ioException ) {
    ioException.printStackTrace();
    System.exit( 1 );
    // end method run
    // set whether or not thread is suspended
    public void setSuspended( boolean status )
    suspended = status;
    } // end class Player
    } // end class TicTacToeServer

    reply #1:
    http://forum.java.sun.com/thread.jspa?threadID=5114663
    &tstart=0@Op. Don't multi/cross-post

  • How java program can work in background ??

    Hi,
    I want to make a program whom must work all the time (it's an alarm).
    But I don't know how can I "say" to my program that it must work also when it's inactive.
    And my program don't have always a graphic interface, only when the alarm "rings".
    Can you help me ??

    http://www.eworksmart.com/JNT/QuickDocumentation.htm
    http://www.alexandriasc.com/software/JavaService/index.html
    These will get U started.. but the easiest way is to add the following LINE of code to your main
    this.transformIntoService((Service)this);

  • Graphical Interface question

    Hello Everybody
    Actually I developp a graphical Interface with different Jpanel.
    and I would like to display certain Jpanel only when I select a particular Command.
    Exemple:
    I have an graphic Interface with 3 Jpanel.
    But the n�3 Jpanel is Hide.
    And when I write ALT+CRT+SHIFT+D sequence, the JPanel n�3 appears on my graphical Interface.
    so i would like to know how i can hide one Jpanel and second how to display this Jpanel when i write a dedicated sequence.
    Thanks in advance for your kind support
    Best Regards

    Using CardLayout along the lines of
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.plaf.basic.*;
    public class CardLayoutExample1 extends JPanel
        // Constants for use with the CardLayout for identifying cards.
        private static enum PageIdentifier
        {NOTHING, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT};
        // The card layout and the panel using it
        private CardLayout cardLayout = new CardLayout();
        private JPanel cardComponent = new JPanel(cardLayout);
        public CardLayoutExample1()
            setLayout(new BorderLayout());
            add(new JLabel("Press <Shift F1> to <Shift F8>"), BorderLayout.NORTH);
            appendCardsToCardComponent();
            add(cardComponent, BorderLayout.CENTER);
            Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener()
                int[] keyCodes = {
                    KeyEvent.VK_F1,
                    KeyEvent.VK_F2,
                    KeyEvent.VK_F3,
                    KeyEvent.VK_F4,
                    KeyEvent.VK_F5,
                    KeyEvent.VK_F6,
                    KeyEvent.VK_F7,
                    KeyEvent.VK_F8,
                PageIdentifier[] pageIdentifiers = {
                    PageIdentifier.ONE,
                    PageIdentifier.TWO,
                    PageIdentifier.THREE,
                    PageIdentifier.FOUR,
                    PageIdentifier.FIVE,
                    PageIdentifier.SIX,
                    PageIdentifier.SEVEN,
                    PageIdentifier.EIGHT,
                public void eventDispatched(AWTEvent event)
                    KeyEvent keyEvent = (KeyEvent)event;
                    for (int index = 0; index < keyCodes.length; index++)
                        System.out.println(keyCodes[index]);
                        if (keyEvent.isShiftDown() && (keyCodes[index] == keyEvent.getKeyCode()))
                            cardLayout.show(cardComponent,pageIdentifiers[index].name());
                            break;
            }, AWTEvent.KEY_EVENT_MASK);
        private void appendCardsToCardComponent()
            cardComponent.add(new JPanel(), PageIdentifier.NOTHING.name());
            cardComponent.add(centerComponent(new JButton("A button (with nothing attached)")), PageIdentifier.ONE.name());
            cardComponent.add(centerComponent(new JLabel("A JLabel", JLabel.CENTER)), PageIdentifier.TWO.name());
            cardComponent.add(new JScrollPane(new JTree()), PageIdentifier.THREE.name());
            JTextArea textArea = new JTextArea(5,20);
            textArea.setText("An editable text area");
            cardComponent.add(textArea, PageIdentifier.FOUR.name());
            Object[][] tableData = {
                {"Alpha","1"},
                {"Beta","2"},
                {"Gamma","3"},
                {"Delta","4"},
                {"Epsilon","5"},
            Object[] tableHeaders = {"First", "Second"};
            JTable table = new JTable(tableData, tableHeaders);
            cardComponent.add(new JScrollPane(table), PageIdentifier.FIVE.name());
            String[] listValues = {"Alpha","Beta","Gamma","Delta","Epsilon"};
            cardComponent.add(centerComponent(new JList(listValues)), PageIdentifier.SIX.name());
            cardComponent.add(centerComponent(new JComboBox(listValues)), PageIdentifier.SEVEN.name());
            cardComponent.add(centerComponent(new Arrows()), PageIdentifier.EIGHT.name());
        static class Arrows extends JPanel
            Arrows()
                super(new GridLayout(0,3));
                add(new JPanel()); add(new BasicArrowButton(BasicArrowButton.NORTH)); add(new JPanel());
                add(new BasicArrowButton(BasicArrowButton.WEST)); add(new JPanel()); add(new BasicArrowButton(BasicArrowButton.EAST));
                add(new JPanel()); add(new BasicArrowButton(BasicArrowButton.SOUTH)); add(new JPanel());
        public JPanel centerComponent(JComponent comp)
            JPanel panel = new JPanel(new GridBagLayout());
            panel.add(comp);
            return panel;
        public static void main(String[] args)
            JFrame frame = new JFrame("Card Layout Example");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setContentPane(new CardLayoutExample1());
            frame.pack();
            frame.setVisible(true);
    }

  • Stuck on "Reached Target Graphical Interface" GNOME

    I was a bit hesitant to post this because I know there are tons of topics about this already, but after several hours of troubleshooting I've gotten nowhere and I really could use some help.
    I got Arch installed earlier today and decided I was going to use Gnome as my DE.  I installed gnome and gnome-extra using pacman -S and everything seemed to go fine.  It asked me to chose between something called mesa libgl, nvidia and another option.  I assume these are the drivers; I just chose the default "mesa".
    I then used systemctl enable gdm.service.  I'm not sure if something should have happened, but based on other threads I've read it sounds like this should have launched Gnome. 
    Either way I rebooted expecting it to launch Gnome, but it gets hung up on "[OK] Reached Target Graphical Interface".  The only way out is to Alt+F2 then log in with "root" and my password.
    Can someone tell me what logs I can post that can help and how I can get those logs to my Windows boot?  I currently have Windows 7 on an SSD and Arch installed on a second hard drive.  I have no idea how to copy or save the logs to bring into Windows (or if that is even possible).
    I just installed Arch this morning with the newest ISO file.
    My graphics card is an Nvidia GeForce GTX 570
    Last edited by Herdo (2014-05-24 05:37:24)

    henk wrote:
    Herdo wrote:It asked me to chose between something called mesa libgl, nvidia and another option.  I assume these are the drivers; I just chose the default "mesa".
    My graphics card is an Nvidia GeForce GTX 570
    Herdo wrote: I then download 3 new xorg packages
    Herdo wrote:I installed xf86-video-nouveau driver and the xf86-video-vesa driver and it works. The only problem I am having now is that the colors look washed out.  Slightly fuzzy and pixelated looking.
    Correct me if I am wrong, but to me it looks like you went straight for Gnome without setting up X, or your graphics card.
    I had a quick look at the Beginners Guide -after a very long time-, and to my surprise the Post Installation part had changed. Setting up X and graphic card has moved to
    a different wiki page. I am wondering, did you look through this page?
    - If you want your graphic card to work properly, you probably would be better of with the nvidia package.
    - After installing Xorg an de video drivers why did you not just re-enable gdm?
    That's exactly what happened.  I wasn't aware I had to configure Xorg or my graphics card when I finished the initial setup.  Thanks for the link. 
    When installing the nvidia package, do I need to uninstall the previous driver packages?

  • How to I get Graphic Drivers for Windows 7 using Bootcamp on my Late 2011 17" MacBook Pro?

    I just received my new 17" Late 2011 MacBook Pro to replace my older model MBP.  I had configured the older MBP with two 500Gb SSD drives by replacing the original hard drive and the DVD with 500Gb SSDs.  Works fine.  I then simply installed these two SSDs from the older MBP on the new machine.  OSX works fine, after a few software updates.  Likewise Win 7 Pro is installed on a Boot Camp partition with the drivers from the Mid 2010 MBP.  Windows seems to run fine after the expected reactivation, but the graphics are obviously not running at full resolution, I am certain this is due to the differing graphics card between the Mid 2010 MBP and the Late 2011 MBP.
    Apple does not show any drivers download for the new MBP, I am running BootCamp software version 4.0.
    Although I could certainly do it, I don't want to spend the time to run a new installation of Windows 7 and reinstall all the myriad windows updates.  It would take hours.
    I know that the new installation process takes a step to download the BootCamp drivers, but how can you reinitiate this process after installing BootCamp as I have without progressing through the whole installation process?
    Any help appreciated.....

    "At least 16 GB of free space on the disk onto which you’re installing for 32-bit, or 20 GB for 64-bit (for Microsoft Windows and Windows-based applications)."
    That's what Apple proposes in here Boot Camp: System requirements for Microsoft Windows
    Personally I would double these amounts and add to that the diskspace needed for your Windows games.
    Stefan

Maybe you are looking for

  • Report on selection-screen fields

    hi,     the selection-screen has the fields invoice number,invoice date and customer name. date is mandatory..now i have to fetch the data based on the selection. if only date is selected,then i have to print the entrie data from that date. how to  w

  • Adress number for particular purchase order number

    hiii experts, in ekpo tbale each po number have adress number (adrnr).these adrnr value maintained in which tcode.    i saw in me23n but i didn' get the adress number.

  • Sapui5 Pie Chart

    Hi all I have created a pie chart. Its all working fine. Here in the above image we can see one section is selected and the message is in circle shape. And here we can also deselect the selected section. But the problem here is when i use the same ap

  • Photoshop cs3 opens jpg in camera raw? help me

    Hi in the preferences file handling -> i setup prefer camera raw for jpg unchecked ->i setup prefer camera raw for supported raw files so photoshop opens only the raw files in camera and the other in normal mode but there is a photo in jpg  that phot

  • Exporting to quicktime mov

    I have been trying to export a sequence to quicktime mov. It creates a file which quicktime cannot recognize as a file to play. I have followed the same process as I always do. Why would it stop working?