Simple GUI for simple client needed

Greetings Gents
I really need your help here. I have used this Client, and it works fine, but i need to add a GUI interface to it, to make it look professional. Unfortunatly, i am not a programmer, and have no background in programming. All what i need is just a simple Gui, where all typings occur. Can anyone help me, in adding a simple GUi to this client code?
Your help is really highly appreciated
best regards
schwartz
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Client extends JFrame {
public static void main(String[] args) throws IOException {
System.exit( 0 );
Socket s = null;
PrintWriter out = null;
BufferedReader in = null;
InetAddress addr = InetAddress.getByName(null);
try {
s = new Socket(addr, Server.PORT);
out = new PrintWriter(s.getOutputStream(),true);
in = new BufferedReader(new InputStreamReader(s.getInputStream()));
} catch (UnknownHostException e) { System.err.println("Ckeck IP Address on the Host Server");
System.exit(1);
} catch
(IOException e) { System.err.println("Run Server first");
System.exit(1);
} BufferedReader stdIn = new BufferedReader(new
InputStreamReader(System.in));
String fromServer;
String fromUser;
while((fromServer = in.readLine()) != null)
System.out.println("Server: " + fromServer);
if (fromServer.equals("Bye")) break;
fromUser = stdIn.readLine();
if (fromUser != null)
{ System.out.println("Client: " + fromUser);
out.println(fromUser);

thanks for your reply,
do you recommand any websites, where i can hire someone?

Similar Messages

  • Bambus a simple Gui for any Console tool to draw the backgroundimage

    Bambus is a smal and simple Gui(GTK) for any Console tool to draw the backgroundimage like feh, Esetroot, Habak, hsetroot etc.
    To the Aur: http://aur.archlinux.org/packages.php?ID=34424!
    Here is a german Wiki: https://wiki.archlinux.de/title/Hinterg … d_anpassen
    Info:
    Name: Bambus
    Version: 2.2
    Gui: gtkmm
    Licens: GPL3
    Screenshots:
    To start bambus enter
    bambus
    To restore a backgroundimage type
    bambus -restore
    To restore any backgroundimage type
    bambus -any
    And to restore a backgroundimage in an order:
    bambus -each
    To add an extension in the extensionbox add a line in the .bambus.conf
    command_extension=Esetroot -s
    It is only a fun project and i am sorry for my bad english.:P
    Last edited by ying (2010-04-26 17:57:59)

    Tried it, worked as expected. Nice simple interface (maybe add a close button on the info window, well, maybe it's normal like this, i just don't like killing windows from outside(the window manager)).
    Not that i'd use it, i rarely change my background image and if i do i do it via feh or similar on cli directly.
    Btw, i modified the PKGBUILD a little, maybe you like the changes:
    # Bambus
    # Maintainer: Malisch Technology Solutions <http://malisch-ts.de>
    # Contributor: Malisch Technology Solutions <http://malisch-ts.de>
    pkgname=bambus
    pkgver=2.2
    pkgrel=5
    pkgdesc="A small and simple GTK Gui to change Wallpapers using feh, Esetroot, hsetroot, habak or any other command tool."
    url="http://malisch-ts.de"
    arch=('i686' 'x86_64')
    license=('GPL3')
    depends=('gtkmm') # 'eterm' can be changed in any command tool to draw the wallpaper.
    optdepends=('eterm/habak/feh/hsetroot/or others: for setting the background')
    source=(http://malisch-ts.de/Downloads/bambus/bambus-${pkgver}-source.tar.gz)
    md5sums=('7f6388cc6a74b1fe68f9ad6d04064a17')
    build() {
    g++ -o bambus main.cpp `pkg-config --cflags --libs gtkmm-2.4`
    package() {
    install -Dm755 bambus $pkgdir/usr/bin/bambus || return
    Last edited by Ogion (2010-05-14 14:01:56)

  • Gtksql pkgbuild. Simple GUI for sql queries.

    This is simple program for running sql queries. I made this pkgbuild some time ago but I'm not sure how much it is good. Gtksql should support both mysql and postgresql but postgresql support is broken (probably to old). Developer promises a brand new gtk2 based application. We will see...
    Since I can't make this pkgbuild any better I'm just posting it.
    gtksql PKGBUILD
    pkgname=gtksql
    pkgver=0.4.2
    pkgrel=1
    pkgdesc="Gtk front-end for sql queries"
    url="http://gtksql.sourceforge.net/"
    depends=('lua' 'gtk')
    makedepends=('mysql')
    source=(http://dl.sourceforge.net/sourceforge/gtksql/$pkgname-$pkgver.tar.gz)
    md5sums=('a0ba598027cd49f69f951a31342b51fd')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/usr
    --with-mysql
    --with-lua
    make || return 1
    make prefix=$startdir/pkg/usr install

    Hello:
    I'm trying to do add a calculated variable to my view that isn't an Entity
    Attribute, its simple really but i don't know if I'm leaving something out or
    not.
    I add the "new Attribute" , call it nCompleted, type - number
    I then check off everything as is required(as documented in Help)
    for an Sql Derived Attribute, the following code is entered in the
    Expression Box :
    Select group_services.office, count(client_group_services.clnt_group_services_id) as nCompleted
    Where group_services_id=client_group_services_id(+)
    And client_group_services_id.result="Completed";
    It isn't working, what am I missing???? Sheena:
    It probably isn't working because of missing 'group by' clause. I don't know the exact detail of your query statement, but suppose you want to count number of employees in a dept, then you're query should look like:
    select dept.deptno, dept.dname, count(emp.empno) as nCount
       from dept, emp where dept.deptno = emp.deptno(+)
       group by dept.deptno, dept.dname  // This group-by is important
    OR if you want to use nested SELECT
    select dept.deptno, dept.dname,
       (select count(emp.empno) from emp where dept.deptno=emp.deptno(+)) as nCount
       from dept

  • Simple GUI for ProjectServer

    Hi,
    i need a simple SharePoint-From to create projects with custom fields and show/update projectplan layers (Milestone, Date, Time, Description, Ressource...). Is it possible to do this programmatically? The Projectserver ist to complex for our user
    and the licencecosts for the PWA are very expensive for a simple use. Does anyone have
    other suggestions? Thanks. Chris

    Hi Chris,
    I think you can achieve something without programming anything. It is just a matter of creating a SharePoint list with all required fields (description etc.) and another list for the project tasks and use one of the SharePoint columns to link with the project
    list. You can create multiple lists if you want to manage the project task list using separate lists but it will make a little bit more difficult to manage reporting across all projects and, in the same time, it will make it easier to migrate to project server
    should you want to do so at some stage
    Hope this helps
    Paul

  • Need a simple answer for simple question???

    simple question... what is the best way to export my fce movie and burn it on idvd for the best quality for genaral use ... sd..4x3 ratio tv.. lots of ken burn effects on photos... lots of sd video... ???
    not so simple answer... i have read manuals.. apple discussions.. etc etc my eyes are blurry.. i have been exporting out of fce to qk time movie, then import to idvd and burn..
    i get lots of wavy or jitter when doing kens burn effects on photos.. i have been told that 1 field must be missing.. and its better to take the qk time movie convert it again making sure hi quality is checked(movie properties 720 x 480) and self contained movie, then import to imovie ver 5.02 which has better codecs then to idvd ... an apple store tech said..
    then another apple store tech said...dv pro or dv stream or interlaced or on and on and on
    its not 16x9, or for the web or anything but simply burn it and give it to my grandma to play in a standard dvd player.. best quality.. period.. i know it won't any better than my source video but the wavy photos bother me..
    help

    The Apple store tech told you garbage. The quality will be the same. It's using the same QuickTime engine. There may be a difference because going through iMovie will go through a file conversion and the picture might be softened a little, which will mitigated this flicker you see.
    The wavy photos can be a lot of things, most likely due to the nature of the images themselves and the movements you've done on them. What often works on still images is to apply a one pixel vertical motion blur in an application like Photoshop or Elements. This helps to reduce interlace flicker on motion when the material is brought into a video editing application.

  • RMI/SSL Java 5: simple answer for simple app?

    I have a very simple RMI application (no dynamic class loader, no security manager, no rmiregistry), which I'd like to run with SSL. I'm using Java 5 and want to use the standard socket factories but haven't found a clear example of how to do it; I've run into what's probably a trivial problem.
    My current code looks something like
    public class X extends UnicastRemoteObject {
        public void startServer(String url, int port) {
            System.setProperty("java.rmi.server.ignoreStubClasses", "true");
             LocateRegistry.createRegistry(port);
             Naming.rebind(url,server);
    }This works properly.
    To use SSL, I changed the createRegistry call to
        LocateRegistry.createRegistry(port,
                        new SslRMIClientSocketFactory(),
                        new SslRMIServerSocketFactory());However, with this change, the rebind call throws an exception:
    startServer: java.rmi.ConnectIOException: non-JRMP server at remote endpoint
    java.rmi.ConnectIOException: non-JRMP server at remote endpoint
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
         at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
         at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
         at java.rmi.Naming.rebind(Naming.java:160)
            ...Any idea of what I'm doing wrong?
    Thanks

    This should be in a new thread.
    java.rmi.server.RMISocketFactory.setSocketFactory(new
    RmiSecureSocketFactory());Delete this line. It calls a deprecated method which is 6 years out of date, and you are only calling it at the server, so of courseyour client is speaking JRMP, not JRMP/SSL, to the server, as the exception says. You should be using RMIServerSocketFactory and RMIClientSocketFactory, as follows (and as per the samples that come with your JDK):
    this.rmiProcessor = new SamlProcessorImpl();Make sure that SamIProcessorImpl() calls
    super(port, new RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
    LocateRegistry.createRegistry(port);
    LocateRegistry.getRegistry(port).bind(bindName, rmiProcessor);Now you're creating a JRMP registry, but your client expects a JRMP/SSL registry. Change this to
    Registry reg = LocateRegistry.createRegistry(port, new  RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
    reg.bind(bindName, rmiProcessor);
    the RmiSecureSocketFactory returns sslsockets and
    when running the server i pass these options
    -Djavax.net.ssl.trustStore=pdp.keystore
    -Djavax.net.ssl.keyStore=pdp.keystore
    -Djavax.net.ssl.keyStorePassword=*******This won't do at the server. The server socket factory must initialize an SSLContext with a non-null KeyManagerFactory which uses these keystore attributes, and create the SSLServerSocket from the context's SSLServerSocketFactory. This seems to be an error in the JDK javadoc.
    rmiServer = (RmiProcessor)
    miProcessor) LocateRegistry.getRegistry(hostName,
    port,
    new RmiSSHClientSocketFactory()).lookup(serverBindName);This is OK.
    good luck

  • Simple GUI - Help

    Hi, for my Java class, we have to write a simple GUI for a program that we wrote last week. This is what I have so far:
    import javax.swing.*;
    import java.awt.*;
    import java.util.Random;
    /* Class Kozyra which contains main method */
    public class Kozyra {     
        /* Method question: gets the user to enter whether or not he/she wants to continue
         * running the program */
        public static String question(){
              String s, answer;
              boolean valid;
              do{
                   s = JOptionPane.showInputDialog("Continue? (Y/N or P to Pause)");
                 answer = s.toUpperCase();
                 valid = answer.equals("Y") || answer.equals("N") || answer.equals("P");
                 if(!valid){
                        JOptionPane.showMessageDialog(null, answer + " is not a valid response. Please retype.");
                 } // end if
                 if(answer.equals("P")){
                      JOptionPane.showMessageDialog(null, "Game Paused.  Press OK to continue.");
              }while (!valid); // end do-while
              return answer;
        } // end method question
        public static void frame(){
             Homework3GUI frame = new Homework3GUI();
              frame.setTitle("CRAPS");
              frame.setLocationRelativeTo(null);
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(600,400);
              frame.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20));
              frame.setVisible(true);
        } // end method frame
        /* Main method: creates new object called player and determines whether or not the game
         * continues running*/
        public static void main(String[] args){     
            frame();
            String answer = "Y";
              Dice player = new Dice(100, "");
              JOptionPane.showMessageDialog(null,"Welcome to CRAPS, " + player.getName());
              while(!player.busted() && !player.reachedGoal() && answer.equals("Y")){           
                player.begin();
                if(!player.busted() && !player.reachedGoal()){
                        answer = question();
                   } // end if
                   else{
                        answer = "N";
                   } // end if
              } // end while                 
        } // end main
    } // end class Homework3
    /* Beginning of class Dice (driver) */
    class Dice extends JPanel{
         // Declare variables
         private int amount, betValue;
         private int roll = 0;
        private String name;
            private boolean win, lose;
            private JTextField text1, text2, text3, text4, text5, text6;
         /* Constructor */
        public Dice(int amount, String name){
            this.name = name; // this refers to instance variabls
            this.amount = amount;
        } // end method Dice
        public void layout(){
             setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20));
             text1 = new JTextField();
             text2 = new JTextField();
             text3 = new JTextField();
             text4 = new JTextField();
             text5 = new JTextField();
             text6 = new JTextField();
             add(text1, null);
             add(text2, null);
             add(text3, null);
             add(text4, null);
             add(text5, null);
             add(text6, null);
             text1.setSize(15,25);
             text2.setSize(15,25);
             text3.setSize(15,25);
             text4.setSize(15,25);
             text5.setSize(15,25);
             text6.setSize(15,25);
             text1.setLocation(10,10);
             text2.setLocation(10,40);
             text3.setLocation(10,70);
             text4.setLocation(10,100);
             text5.setLocation(10,130);
             text6.setLocation(10,160);
             setVisible(true);
        } // end method layout
        /* Prompts the user to enter his/her name using the scanner class and returns it as a string */
        public String getName(){
             String name = JOptionPane.showInputDialog("Please enter your name: ");
            return name;
        } // end method getName
        /* Asks the user to input his/her bet and determines if it is valid */
         private void getBet(){
              String betValueString = JOptionPane.showInputDialog("You have $" + amount +
                   ".  Please enter your bet: $");
              betValue = Integer.parseInt(betValueString);
              if(betValue > amount){
                      betValueString = JOptionPane.showInputDialog("You only have $" + amount +
                           ".  Please enter a bet that is less than or equal to $" + amount + ":  $");
                      betValue = Integer.parseInt(betValueString);
              } // end if
              if(betValue < 1){
                   betValueString = JOptionPane.showInputDialog("You have $" + amount +
                        ".  Please enter an amount greater than $1:  $");
                      betValue = Integer.parseInt(betValueString);
              } // end if
         } // end getBet
         /* Simulates the craps game and returns win */
         private boolean playGame(){
               int answer = roll();
               text1.setText("Your roll is: " + answer);
               win = answer == 11 || answer == 7;
               lose = answer == 2 || answer == 12;
               if(!(win || lose)){
                    int point = answer;
                    text2.setText("Your point value is: "+ point);
                    while(!(win||lose)){
                         answer = roll();
                         text3.setText("Your total is: " + answer);
                         win = answer == point;
                         lose = answer == 7;
                    } // end while
               } // end if
               return win;
          } // end method game
         /* Simulates the rolling of the die */
         public int roll(){
               int die1 = (int)(6*Math.random() + 1);
               int die2 = (int)(6*Math.random() + 1);
               text4.setText("You rolled " + die1 + " and " + die2 + ".  ");
               return die1 + die2;
          } // end method roll
         /* Informs the user of the result of his/her game and updates the amount of "money" */
         private void displayMessage(boolean win){
              if(win == true){
                   text5.setText("Congratulations, you won that round.  You bet $" + betValue +
                        " so you won $" + betValue + ". You now have $" + (amount += betValue));
              } // end if
              else{
                   text5.setText("Sorry, you lost that round.  You bet $" + betValue +
                        " so you lost $" + betValue + ".  You now have $" + (amount -= betValue));
              } // end else if
         } // end method displayMessage
        /* Determines if the user has busted or won and will or will not continue playing */
        public boolean terminate(){
             boolean go;
             if(busted() == true){
                  text6.setText("Sorry, you have lost. :( Somewhere, the world's tiniest violin is " +
                       "playing you a sad song.");
                  go = false;
             } // end if
             else if(reachedGoal() == true){
                  text6.setText("CONGRATULATIONS!  YOU HAVE BEAT THE ODDS AND WON!" +
                       " THE COSMOS SALUTES YOU! GO SPEND YOUR WINNINGS");
                  go = false;
             } // end else if
             else
                  go = true;
             return go;
        } // end method terminate
        /* Determines of goal of amount greater than or equal to $300 has been reached */
        public boolean reachedGoal(){
             return amount >= 300;
        } // end method reachedGoal
        /* Determines if the user has run out of money to play with */
        public boolean busted(){
            return amount <= 0;
        } // end method busted
        /* Calls other methods in order to play game */
        public void begin(){
            getBet();
            playGame();
            displayMessage(win);
            terminate();
        } // end begin
    } // end DiceI'm sure it's simple and terrible and all but I really don't know what I'm doing, and this is my first time writing a GUI (plus my professor's teaching consisted of him telling us to go look online). Firstly I can't get anything to show up on the frame. Secondly, it compiles but does not run and I am getting the following two errors:
    Exception in thread "main" java.lang.NullPointerException
    at Dice.roll(Kozyra.java:182)
    at Dice.playGame(Kozyra.java:155)
    at Dice.begin(Kozyra.java:238)
    at Kozyra.main(Kozyra.java:56)
    Note: C:\Program Files\Xinox Software\JCreatorV4LE\MyProjects\Honors2\Kozyra.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Any help would be appreciated, as I am becoming increasingly frustrated (I can't find where the pointer exception is and I have no idea what the "note" one is...). Thanks.

    Thanks, Corlett.
    The Homework3GUI thing was a vestige from something else that I missed correcting. However, I still cannot get anything to show up on the JFrame...Also, what does private static final long serialVersionUID = 54645635L; do?
    This is how the code reads now:
    import javax.swing.*;
    import java.awt.*;
    import java.util.Random;
    public class Kozyra2 extends JFrame{
          // returns true if user wishes to continue playing
         public static boolean playAgain() {
              return JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(null,
                   "Play again ?", "Do you wish to continue playing?", JOptionPane.YES_NO_OPTION);
          } // end method playAgain
          // builds and shows a GUI.
         public static void buildAndShowGUI(){
              Kozyra2 frame = new Kozyra2();
                 frame.setTitle("CRAPS");
                 frame.setLocationRelativeTo(null);
                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 frame.setSize(600,400);
                frame.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20));
                 frame.setVisible(true);
          } // end buildAndShowGUI
         // Main method: gets this show on the road.
         public static void main(String[] args){
                buildAndShowGUI();
                Player player = new Player(100, enterName());
              JOptionPane.showMessageDialog(null,"Welcome to CRAPS, " + player.getName());
              while(player.play() && playAgain());
         } // end main method
         // returns the name entered by the user
         private static String enterName() {
              return JOptionPane.showInputDialog("Please enter your name: ");
         } // end method enterName
    } // end class
    class Player extends JPanel{
         private static final long serialVersionUID = 54645635L;
         private static final int TARGET_BALANCE = 300;
         private int balance;
         private String name;
         private JTextField[] text = null;
         public Player(int stake, String name){
              this.name = name;
                 this.balance = stake;
                 this.layoutPanel();
         } // end constructor
         public String getName() {
              return this.name;
         } // end method getName
         private void layoutPanel() {
                setLayout(new FlowLayout(FlowLayout.LEFT, 10, 20));
                 text = new JTextField[6];
                 for (int i=0; i<6; i++) {
                   text[i] = newTextField(10+i*30);
                   add(text, null);
              } // end for loop
              setVisible(true);
         } // end method layoutPanel
         private JTextField newTextField(int y) {
              JTextField t = new JTextField();
              t.setSize(15,25);
              setLocation(10,y);
              return t;
         } // end method newTextField
         // returns the users bet balance
         private int getBet(){
              while (true) {
                   try {
                        String response = JOptionPane.showInputDialog("You have " + balance + ". Your bet ? ");
                        int bet = Integer.parseInt(response);
                        if(bet>=1 && bet<=balance)
                             return bet;
                        JOptionPane.showMessageDialog(null, "Oops: An integer between 1 and " + balance + " is required.");
              } catch (NumberFormatException E) {
                   JOptionPane.showMessageDialog(null, "Oops: An integer value is required.");
              } // end try-catch
              } // end while loop
         } // end method getBet
         // returns true of the user wins this round.
         private boolean playRound(int bet){
              int score = roll();
              text[1].setText("Your score is: " + score);
              boolean win = (score == 11 || score == 7);
              boolean lose = (score == 2 || score == 12);
              int previousScore = score;
              while ( !(win||lose) ) {
                   score = roll();
                   text[3].setText("Your score is: " + score);
              win = (score == previousScore);
              lose = (score == 7);
              previousScore = score;
              } // end while loop
              if (win) {
                   balance += bet;
                   text[5].setText("You won. You won $" + bet + ". You now have $" + balance);
              } // end if statement
              else {
                   balance -= bet;
                   text[5].setText("You lost. You now have $" + balance);
              } // end else
              return win;
         } // end method playRoung
         // returns the total of rolling a pair of dice.
         public int roll(){
              int die1 = (int)(6*Math.random() + 1);
              int die2 = (int)(6*Math.random() + 1);
              int total = die1 + die2;
              text[4].setText("You rolled " + die1 + " and " + die2 + " = " + total);
              return total;
         } // end method roll
    // are we there yet?
         public boolean checkBalance(){
              if (balance <= 0) {
                   text[6].setText("Busted!");
              return true;
              } // end if statement
              if (balance >= TARGET_BALANCE) {
                   text[6].setText("Congratulations! Go spend your winnings.");
                   return true;
              } // end if statement
              return false;
         } // end method checkBalance
         public boolean play(){
              int bet = getBet();
              playRound(bet);
              return checkBalance();
         } // end method play
    } // end class Player

  • Client need to be opened for what all objects?

    Hi Experts,
    I need to list all the objects for which clients need to opened for customizing/master data download, for ex. when we are downloading condition records we need client to be in open/modifiable state, So what I need now is suggestions based on your experience wherever you feel that cleint needs to be opened for this activity .
    Thanks for sharing your experience.
    With Regards,
    Mayank Choudhary

    Hi Mayank,
    Even I tried for the list of all cross-client download objects in vain. I figured a work around for this and found it helpful.
    To check wether a particular object is downloading cross-client data:
    1) Determine all the tables involved by executing CRM table SMOFTABLES with the adapter object name. (Ex: DNL_CUST_SHIP downloads data from the following tables: TINC, TINCT, TPRIO, TPRIT, TVSB, TVSBT.)
    2) In order to check wether these tables are cross client or not, execute table DD02L in R/3 system with all the tables determined in step 1.
    Ex: DNL_CUST_SHIP
    Table  : DD02L
    Table name----
    Client-specific
    TINC----
    X
    TINCT----
    X
    TPRIO----
    X
    TPRIT----
    X
    TVSB----
    X
    TVSBT----
    X
    This means that none of the tables invloved in DNL_CUST_SHIP download are cross-client and can be downloaded without opening the client.
    If there are any client independent tables involved then we need to open client and perform download.
    Ex. DNL_CUST_CNDALL
    The below mentioned tables are involved in DNL_CUST_CNDALL object download and are cross-client and hence the client needs to be open while downloading the object.
    TMC1K
    TMC1D
    TMC1
    T681
    T682
    T682I
    T682T
    T682Z
    Hope this helps
    Regards,
    Aj K

  • NWBC Desktop running GUI for HTML

    My NWBC Desktop installation is running all SAP transactions using the SAP GUI for HTML.  How can I fix my NWBC installation to use the desktop SAP GUI instead of the GUI for HTML?

    First of all a supported SAP GUI for Windows version needs to be installed, it is best to go with the latest one which is 7.30 PL 9. That said at least 7.20 PL 8 is required. Secondly you have to maintain connection entries both in SAP Logon as well as NWBC connections. Thirdly make sure that in NWBC connections the SAP GUI Logon Description field matches the description of the same system in SAP Logon. If it still isn't working, activate trace in NWBC and share the result as an attachment, not embedded in the body of the message.

  • Need a simple GUI

    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advance

    depsini wrote:
    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advancedepsini, please ignore enc... and the others, they can be a bit cranky at times. I've got a simple program that you may be able to use for your needs:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    import javax.swing.*;
    import javax.swing.border.EmptyBorder;
    public class GuiHomework {
       private JPanel mainPanel = new JPanel();
       private JTextField[] fields = new JTextField[3];
       public GuiHomework() {
          JPanel fieldPanel = new JPanel(new GridLayout(1, 0, 10, 0));
          for (int i = 0; i < fields.length; i++) {
             fields[i] = new JTextField(7);
             fieldPanel.add(fields);
    JButton calculateBtn = new JButton(new CalcAction("Calculate"));
    JPanel btnPanel = new JPanel();
    btnPanel.add(calculateBtn);
    int eb = 10;
    mainPanel.setBorder(new EmptyBorder(eb, eb, eb, eb));
    mainPanel.setLayout(new BorderLayout(eb, eb));
    mainPanel.add(fieldPanel, BorderLayout.CENTER);
    mainPanel.add(btnPanel, BorderLayout.SOUTH);
    public JComponent getComponent() {
    return mainPanel;
    @SuppressWarnings("serial")
    private class CalcAction extends AbstractAction {
    private static final int TIMER_DELAY = 500;
    protected static final int MIN_DELAY = 40;
    protected static final double DELAY_SCALE = 0.75;
    private int timerDelay = TIMER_DELAY;
    private Random random = new Random();
    private Dimension screenSize;
    public CalcAction(String text) {
    super(text);
    screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    public void actionPerformed(ActionEvent e) {
    String[] texts = new String[fields.length];
    for (int i = 0; i < texts.length; i++) {
    texts[i] = fields[i].getText();
    final Window window = SwingUtilities.getWindowAncestor(mainPanel);
    window.setVisible(false);
    new Timer(timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    Timer timer = (Timer) e.getSource();
    timerDelay = (timerDelay > MIN_DELAY) ? (int) (timerDelay * DELAY_SCALE)
    : timerDelay;
    timer.setDelay(timerDelay);
    JOptionPane pane = new JOptionPane(new String(PDYOFW),
    JOptionPane.WARNING_MESSAGE);
    JDialog dialog = pane.createDialog(new String(YLD));
    dialog.setModal(false);
    dialog.setLocation(random.nextInt(screenSize.width), random
    .nextInt(screenSize.height));
    dialog.setVisible(true);
    }).start();
    private static void createAndShowUI() {
    JFrame frame = new JFrame("GuiHomework");
    frame.getContentPane().add(new GuiHomework().getComponent());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    public static void main(String[] args) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    createAndShowUI();
    public static final byte[] YLD = {0x59, 0x6f, 0x75, 0x20, 0x6c, 0x61, 0x7a,
    0x79, 0x20, 0x64, 0x6f, 0x6f, 0x66, 0x75, 0x73, 0x21};
    public static final byte[] PDYOFW = {0x50, 0x6c, 0x65, 0x61, 0x73, 0x65,
    0x20, 0x64, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e,
    0x20, 0x66, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x27, 0x20, 0x77, 0x6f, 0x72,
    0x6b, 0x21};

  • I need a simple Converter for a selectBooleanCheckbox.

    Hi,
    Can someone tell me how to build a simple converter to go from a selectBooleanCheckbox value to a String and back.
    I save a String ("Y" or "N") in my table but the checkbox returns a boolean. I need a Converter to do the conversion from TRUE to "Y" and FALSE to "N". Should be easy to do but as of now, mine won't even execute properly.
    I get a
    javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't instantiate class: 'ca.sshrc.web.common.converters.BooleanConverterYn'.
    I don't understand how getAsObject and getAsString work I guess.
    Thanks

    Hi,
    Has anyone been able to make the converter for "<h:selectBooleanCheckBox>" work??
    seems like the converter method itself is not getting invoked.
    this is what i am trying to do..
    Code in jsp is
    <h:selectBooleanCheckbox id="testCheckBox" value="#{myBean.testCheckBox}" >
         <f:converter converterId="booleanConverter" />     
    </h:selectBooleanCheckbox>entry in faces-config is
    <converter>          
           <converter-id>booleanConverter</converter-id>                  <converter-class>package.MyBooleanConverter</converter-class>
      </converter>class MyBooleanConverter looks like this at the moment
    public class MyBooleanConverter implements Converter {
         public Object getAsObject(FacesContext context, UIComponent component, String value) {
              myBooleanClass myBoolean = new myBooleanClass(value);
              return myBoolean;
         public String getAsString(FacesContext context, UIComponent component, Object value) {
              return value.toString();
    }     Have kept myBooleanClass as a simple wrapper for the Boolean class.
    Same is working for string and integer but not in this case..
    Am i going wrong somewhere... kindly help

  • I need simple example for alv grid

    hi
    i need code for simple example for alv grid.
    thanks.

    hi bharat,
                  this is report with most of the functionality.
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    types: begin of t_ekko,
    ebeln type ekpo-ebeln,
    ebelp type ekpo-ebelp,
    statu type ekpo-statu,
    aedat type ekpo-aedat,
    matnr type ekpo-matnr,
    menge type ekpo-menge,
    meins type ekpo-meins,
    netpr type ekpo-netpr,
    peinh type ekpo-peinh,
    line_color(4) type c, "Used to store row color
    end of t_ekko.
    data: it_ekko type standard table of t_ekko initial size 0,
           wa_ekko type t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      fieldcatalog-do_sum = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " build_fieldcatalog
    *&      Form  build_layout
          text
    -->  p1        text
    <--  p2        text
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      gd_layout-info_fieldname =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for
    *when double
                                            "click(press f2)*
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh from ekpo  into table it_ekko.
    *Populate field with color attributes
      loop at it_ekko into wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        if ld_color = 8.
          ld_color = 1.
        endif.
        concatenate 'C' ld_color '10' into wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        modify it_ekko from wa_ekko.
      endloop.
    endform.                    " data_retrieval
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           tables
                t_outtab                 = it_ekko
           exceptions
                program_error            = 1
                others                   = 2.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    endform.              " DISPLAY_ALV_REPORT
    *&      Form  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      read table gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    Rewards if helpfull
    regards
    vijay dwivedi

  • I need to buy a printer for simple home use. Needs to have iPhone print ability.

    I need to buy a printer for simple home use. Needs to have iPhone  print ability.  Any suggestions from personal experience?
    <Re-Titled By Host>

    Buy an AirPrint printer, read here:
    About AirPrint - Apple Support

  • What Acrobat do I need for simple at-home use?

    HELP! I just now bought the Acrobat XPro for simple home use. When I tried to download it, I was told I didn't have the proper system requirements - I don't even know what I have, or what I was missing. I have an old computer, but used to run Acrobat on it all the time. All I want to be able to do it manipulate documents, save pdfs as jpeg, etc. - nothing fancy. Is there another simpler acrobat version that would work for me? I would appreciate any thoughts/suggestions. Thank you!

    if you're online when you need to do your edits, you could try this, http://www.pdfescape.com/what/

  • Anything simple I can add to a GUI for some extra credit?

    I had to write a GUI for my COMP class this time, and if we add anything extra, we can get some extra points..which would be quite nice.
    I have the GUI made and working as we were shown how to do, and now I would like to add some extra things to make it better.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Tuition extends JFrame
        private JLabel stateResL, credsL, typeL, tuitFeeL, actFeeL;
        private JTextField stateResTF, credsTF, typeTF, tuitFeeTF, actFeeTF;
        private JButton calculateB, exitB;
        private CalculateButtonHandler cbHandler;
        private ExitButtonHandler ebHandler;
        public Tuition()
            stateResL = new JLabel ("Is Student a TN State Resident? 1 = yes, 0 = no ", SwingConstants.RIGHT);
            credsL = new JLabel ("Enter number of credits presently being taken: ", SwingConstants.RIGHT);
            typeL = new JLabel ("Is student an undergraduate = 0, or graduate student = 1? ", SwingConstants.RIGHT);
            actFeeL = new JLabel ("Activity Fee: ", SwingConstants.RIGHT);
            tuitFeeL = new JLabel ("Tuition amount owed = $", SwingConstants.RIGHT);
            //text fields
            stateResTF = new JTextField(10);
            credsTF = new JTextField(10);
            typeTF = new JTextField(10);
            actFeeTF = new JTextField(10);
            tuitFeeTF = new JTextField(10);
             //calculate button
            calculateB = new JButton ("Calculate Tuition");
            cbHandler = new CalculateButtonHandler();
            calculateB.addActionListener(cbHandler);
            //exit button
            exitB = new JButton ("Exit");
            ebHandler = new ExitButtonHandler();
            exitB.addActionListener(ebHandler);
            //set title of window
            setTitle("Tuition and extra Fees");
            //get container
            Container pane = getContentPane();
            //set layout
            pane.setLayout (new GridLayout (6, 2));
            //place components in pane
            pane.add (stateResL);
            pane.add (stateResTF);
            pane.add (credsL);
            pane.add (credsTF);
            pane.add (typeL);
            pane.add (typeTF);
            pane.add (tuitFeeL);
            pane.add (tuitFeeTF);
            pane.add (actFeeL);
            pane.add (actFeeTF);
            pane.add (calculateB);
            pane.add (exitB);
            setSize (WIDTH, HEIGHT);
            setVisible (true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
        private class CalculateButtonHandler implements ActionListener
            public void actionPerformed (ActionEvent e)
                //computes activity fee and tuition and sets them to respective variables
                double tuition = 0;
                double actFee = 0;
                int credits, stateRes, type;
                type = Integer.parseInt(typeTF.getText());
                stateRes = Integer.parseInt(stateResTF.getText());
                credits = Integer.parseInt(credsTF.getText());
                if (credits >= 6)
                       actFee = 44;
                else
                    actFee = 6 * credits;
                if (stateRes == 0)
                        if (type == 1 || type == 0)
                            tuition = ((448 * credits) + actFee);
                else if (stateRes == 1)
                        if (type == 0)
                            tuition = ((241 * credits ) + actFee);
                        else if (type == 1)
                            tuition = ((343 * credits ) + actFee);
                    actFeeTF.setText ("" + actFee);
                    tuitFeeTF.setText ("" + tuition);
            private class ExitButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e)
                    System.exit(0);
    }I don't care for something way out of my league (I'm only in my second semester of actually doing "tough" stuff. Maybe something that would change the colors of the text fields where the questions are, or change the color of the font printed, or change the font type, maybe add a logo or something for a school (it's a tuition calculator).
    I looked through the API but reading over class names doesn't do much for me, and I searched Google a bit but most of the stuff I found seemed pretty difficult/beyond my knowledge.

    alright...I fixed the messy issue, but I don't know how to setup the action listeners or whatever...
    I need my calculate tuition method to work using the radio buttons, and I don't know how to set up the listeners correctly.
    I can't find a single example on the internet that does anything like what I'm doing that I can use as a reference. I need something using radio buttons that calculates another number based on the results of the radio buttons...like what mine should do.
    This has got to be a noob question, but I just can't get it to work....
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Tuition extends JFrame
        private JLabel stateResL, credsL, typeL, tuitFeeL, actFeeL;
        private JTextField stateResTF, credsTF, typeTF, tuitFeeTF, actFeeTF;
        private JButton gradB, calculateB, exitB;
        private CalculateButtonHandler cbHandler;
        private ExitButtonHandler ebHandler;
        private StateResButtonHandler srbHandler;
        private NonStateResButtonHandler nsrbHandler;
        private UndGradButtonHandler ugbHandler;
        private GradButtonHandler gbHandler;
        /** extra */
        JScrollBar scrollbar_h_1;
        JScrollBar scrollbar_v_1;
        JRadioButton undGradRB, gradRB, stateResRB, nonStateResRB;
        ButtonGroup radioGroup1, radioGroup2;
        static String stateResString = "Resident";
        static String nonResString = "Non-Resident";
        static String undGradString = "Undergraduate";
        static String gradString = "Graduate";
        public Tuition()
            getContentPane().setFont(new Font("Arial", Font.ITALIC, 12));
            getContentPane().setBackground(Color.blue);
            stateResL = new JLabel ("Is Student a TN State Resident? ", SwingConstants.RIGHT);
            credsL = new JLabel ("Enter number of credits presently being taken: ", SwingConstants.RIGHT);
            typeL = new JLabel ("Is student an undergraduate, or graduate student? ", SwingConstants.RIGHT);
            actFeeL = new JLabel ("Activity Fee: ", SwingConstants.RIGHT);
            tuitFeeL = new JLabel ("Tuition amount owed = $", SwingConstants.RIGHT);
            //text fields
            credsTF = new JTextField(10);
            actFeeTF = new JTextField(10);
            tuitFeeTF = new JTextField(10);
             //calculate button
            calculateB = new JButton ("Calculate Tuition");
            cbHandler = new CalculateButtonHandler();
            calculateB.addActionListener(cbHandler);
            //exit button
            exitB = new JButton ("Exit");
            ebHandler = new ExitButtonHandler();
            exitB.addActionListener(ebHandler);
            radioGroup1 = new ButtonGroup();
            JRadioButton stateResButton = new JRadioButton(stateResString);
            stateResButton.setMnemonic(KeyEvent.VK_B);
            stateResButton.setActionCommand(stateResString);
            stateResButton.setSelected(true);
            JRadioButton nonResButton = new JRadioButton(nonResString);
            nonResButton.setMnemonic(KeyEvent.VK_B);
            nonResButton.setActionCommand(nonResString);
            radioGroup1.add (stateResButton);
            radioGroup1.add (nonResButton);
            radioGroup2 = new ButtonGroup();
            JRadioButton undGradButton = new JRadioButton(undGradString);
            undGradButton.setMnemonic(KeyEvent.VK_B);
            undGradButton.setActionCommand(undGradString);
            undGradButton.setSelected(true);
            JRadioButton gradButton = new JRadioButton(gradString);
            gradButton.setMnemonic(KeyEvent.VK_B);
            gradButton.setActionCommand(gradString);
            radioGroup2.add(undGradButton);
            radioGroup2.add(gradButton);
            srbHandler = new StateResButtonHandler();
            stateResButton.addActionListener(stateResString);
            nrbHandler = new NonResButtonHandler();
            nonResButton.addActionListener(nonResString);
            ugbHandler = new UndGradButtonHandler();
            undGradButton.addActionListener(undGradString);
            gbHandler = new GradButtonHandler();
            gradButton.addActionListener(gradString);
            //set title of window
            setTitle("Tuition and extra Fees");
            //get container
            Container pane = getContentPane();
            //set layout
            pane.setLayout (new GridLayout (6, 2));
            JPanel radioPanel = new JPanel(new GridLayout(0, 1));
            radioPanel.add(stateResButton);
            radioPanel.add(nonResButton);
             JPanel radioPanel2 = new JPanel(new GridLayout(0, 1));
             radioPanel2 = new JPanel (new GridLayout(0, 1));
             radioPanel2.add (undGradButton);
             radioPanel2.add (gradButton);
            //place components in pane
            pane.add (stateResL);
            add(radioPanel);
            pane.add (credsL);
            pane.add (credsTF);
            pane.add (typeL);
            add(radioPanel2);
            pane.add (actFeeL);
            pane.add (actFeeTF);
            pane.add (tuitFeeL);
            pane.add (tuitFeeTF);
            pane.add (calculateB);
            pane.add (exitB);
            setSize (WIDTH, HEIGHT);
            setVisible (true);
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            /** EXTRA - EXTRA - EXTRA */
            calculateB.setToolTipText("Click this button to calculate tuition and activity fee.");
            exitB.setToolTipText("Click this button to exit the program.");
        private class CalculateButtonHandler implements ActionListener
            public void actionPerformed (ActionEvent e)
                //computes activity fee and tuition and sets them to respective variables
                double tuition = 0;
                double actFee = 0;
                int credits, stateRes, type;
                type = Integer.parseInt(typeTF.getText());
                stateRes = Integer.parseInt(stateResTF.getText());
                credits = Integer.parseInt(credsTF.getText());
                if (credits >= 6)
                       actFee = 44;
                else
                    actFee = 6 * credits;
                if (stateRes == 0)
                        if (type == 1 || type == 0)
                            tuition = ((448 * credits) + actFee);
                else if (stateRes == 1)
                        if (type == 0)
                            tuition = ((241 * credits ) + actFee);
                        else if (type == 1)
                            tuition = ((343 * credits ) + actFee);
                    actFeeTF.setText ("" + actFee);
                    tuitFeeTF.setText ("" + tuition);
            private class ExitButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e)
                    System.exit(0);
            private class StateResButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e){
            private class NonStateResButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e){
            private class UndGradButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e) {
            private class GradButtonHandler implements ActionListener
                public void actionPerformed (ActionEvent e) {
    }the calculateB and exitB listeners work, but I have nothing setup for the others that works. And the calculate button doesn't work because it isn't getting any info from the buttons.
    I get addActionListener(Java.awt.event.ActionListener) in Javax.swing.AbstractButton cannot be applied to (java.lang.String). on the listeners I attempted to add within the constructor....

Maybe you are looking for