GUI, NullPointerException and WTK

Hi There,
i wrote this simple application:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HighUI extends MIDlet {
     private Display display;
     private Form form;
     private TextField name;
     private TextField phone1;
     private TextField phone2;
     private TextField phone3;
     private Command exit;
     private Command submit;
     private List contact;
     public HighUI() {
          super();
          display = Display.getDisplay(this);
             form = new Form("Contact");
          name = new TextField("Nome:", null, 30, TextField.ANY);
          phone1 = new TextField("Tel1:", null, 15, TextField.PHONENUMBER);
          phone2 = new TextField("Tel2:", null, 15, TextField.PHONENUMBER);
          phone3 = new TextField("Tel3:", null, 15, TextField.PHONENUMBER);
          form.append(name);
          form.append(phone1);
          form.append(phone2);
          form.append(phone3);
          submit = new Command("Invia", Command.OK, 1);
          exit = new Command("Esci", Command.EXIT, 1);
          form.addCommand(submit);
          form.addCommand(exit);
          form.setCommandListener(public void commandAction(Command c, Displayable arg1) {
                    if (c == exit) {
                         notifyDestroyed();
                    } else if (c == submit) {
                         String nameValue = name.getString();
                         contact = new List(nameValue, List.IMPLICIT);
                         contact.append(phone1.getString(), null);
                         contact.append(phone2.getString(), null);
                         contact.append(phone3.getString(), null);
                         display.setCurrent(contact);
     protected void startApp() throws MIDletStateChangeException
        display.setCurrent(form);
    protected void pauseApp() { }
    protected void destroyApp(boolean arg0) throws MIDletStateChangeException { }
}...The code is correct... or atlast the compiler doesn't give me any error... Why when i start the application in the device-phone emulator i give this error in the console and the app doesn't start?
Project "HighUI" loaded
Running with storage root DefaultColorPhone
Unable to create MIDlet highui.HighUI
java.lang.ClassNotFoundException: highui/HighUI
     at com.sun.midp.midlet.MIDletState.createMIDlet(+14)
     at com.sun.midp.midlet.Selector.run(+22)
Execution completed.Thank you for answers :)
Bye bye
hawake
Edited by: hawake on Nov 27, 2007 12:39 PM

Hi, the previous error is correct now! :) Thank you!
But, another boring question, now I give another error with this source (corrected):
package highui;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HighUI extends MIDlet {
     private Display display;
     private Form form;
     private TextField name;
     private TextField phone1;
        private TextField phone2;
     private TextField phone3;
     private Command exit;
     private Command submit;
     private List contact;
     public HighUI() {
          super();
          display = Display.getDisplay(this);
             form = new Form("Contact");
          name = new TextField("Nome:", null, 30, TextField.ANY);
          phone1 = new TextField("Tel1:", null, 15, TextField.PHONENUMBER);
          phone2 = new TextField("Tel2:", null, 15, TextField.PHONENUMBER);
          phone3 = new TextField("Tel3:", null, 15, TextField.PHONENUMBER);
          form.append(name);
          form.append(phone1);
          form.append(phone2);
          form.append(phone3);
          submit = new Command("Invia", Command.OK, 1);
          exit = new Command("Esci", Command.EXIT, 1);
          form.addCommand(submit);
          form.addCommand(exit);
          form.setCommandListener(this);
public void commandAction(Command c, Displayable arg1) {
                    if (c == exit) {
                         notifyDestroyed();
                    } else if (c == submit) {
                         String nameValue = name.getString();
                         contact = new List(nameValue, List.IMPLICIT);
                         contact.append(phone1.getString(), null);
                         contact.append(phone2.getString(), null);
                         contact.append(phone3.getString(), null);
                         display.setCurrent(contact);
     protected void startApp() throws MIDletStateChangeException
        display.setCurrent(form);
    protected void pauseApp() { }
    protected void destroyApp(boolean arg0) throws MIDletStateChangeException { }
}Error:
Project settings saved
Building "HighUI"
D:\Programmi\WTK22\apps\HighUI\src\highui\HighUI.java:33: setCommandListener(javax.microedition.lcdui.CommandListener) in javax.microedition.lcdui.Displayable cannot be applied to (highui.HighUI)
          form.setCommandListener(this);
              ^
1 error
com.sun.kvem.ktools.ExecutionException
Build failedThank you for answer!
Bye
hawake

Similar Messages

  • How to build Java ME code without GUI desktop and WTK?

    I want to do application development for cell phones implementing MIDP and CLDC. I see that there is a sun java wireless toolkit available for this. However, it requires an X server or GUI desktop to execute the toolkit. I want a build environment where I can build my source files into Java code. So, what I need is just the necessary JAR files, preverify command, etc. Is there such a distribution from Sun?

    For compiling use javac from standart JDK with your classpath.
    And use preverify, jadtool, mekeytool utils from "JavaME platform SDK3.0" or WTK2.5.2

  • Trying to pass parameters between GUI classes and methods

    Hi All.
    I have been working on a rather large final year project in college and it is getting close to the deadline. It looks as though I need to "tidy up" my code as it contains too many static methods, variables and other bad programming habits. My package consists of many different GUI's and classes. Up until now I have been calling different GUI's with guiName.NameOfMethod. I have been told this is bad practice so I am trying to fix this. Also instead of passing parameters correctly I have been creating static variables in my main class and using them. So for example if one class needed to pass a variable to the other I would first myGlobalVariable = X; in the first class. And then the second class can use this. This is also bad, right?
    So I guess im really just looking for a good example or tutorial on how to pass parameters between classes and methods, GUI if possible. Here is an example of how my GUI classes look:
    public class anotherGUI extends JFrame implements ActionListener {
            private JTextField a, b, c;
            private JButton button1, button2;
            JPanel p, p1;                   
            public anotherGUI() {
                LayOutAnotherGUI();
                setLocationRelativeTo(DnDMain.pictureArray[a]);
                setTitle("Example");
                setVisible(true);
                pack();     
            private void LayOutAnotherGUI(int c) {
         //GUI is layed out here     
            public void actionPerformed(ActionEvent e) {
                Object source = e.getSource();
                if (source == submit)
                    clickOK();
            public void clickOK(){
                //Here is where I have been accessing and modifying static global variables.  (But this needs to change).
    public void showanotherGUI() {
            new anotherGUI();
    }This is more or less how I have been going about creating my GUI's. These are used as pop ups. The user enters a value and then it is closed.
    To be honest I have been able to pass a variable correctly from one class to a GUI class but I have still having difficulty. For example in my code above I can pass the variable into this class but I cannot pass it into clickOK(). An this is where it is needed.
    Can anyone please help?
    I hope I have explained my problem well.
    Thanks in advance.

    I dont think that is what I need. An example of what I do in my program is:
    I have a main GUI with an array of images. There are a number of other small GUI's that appear for certain functions when the user clicks on an image or does some other function. I am trying to pass a value into the GUI class that is used for the smaller "pop up" GUI. So lets say the user has clicked the image in array[12]. Then a GUI is displayed. I need to pass the integer 12 into this class.
    Thanks.

  • [Solved] Launch GUI application and detach it from terminal

    Hello, I find it convenient launching apps from terminal, but after that I am unable to use the terminal, since it it's "attached" to the process. Some searching revealed 2 methods of doing this, but they both don't work for me
    1) add "&" after the command: upon closing the terminal the application closes as well; not what I want
    2) press ctrl+z: this just closes the app
    So how do I type a command to launch a GUI app and continue using the terminal?
    I am using mate-terminal.
    Last edited by axper (2013-02-11 19:14:08)

    kaszak696 wrote:https://bbs.archlinux.org/viewtopic.php?id=157405
    Thanks a lot, this is exactly what I wanted (for Bash):
    olive wrote:
    You can disown them (man bash). I have put
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'disown -a -h'
    in my ~/.bashrc with the effect that if you launch a program in the background (with &). It will not be stopped when you close the terminal.
    For Zsh, put this in your .zshrc
    precmd_disown() {
    emulate -L zsh
    setopt extendedglob
    local job match mbegin mend
    jobs | while read job; do
    if [[ $job = \[(#b)([[:digit:]]##)\]*running* ]]; then
    disown %$match[1]
    fi
    done
    autoload -U add-zsh-hook
    add-zsh-hook precmd precmd_disown
    (from http://www.zsh.org/mla/users/2010/msg00654.html)
    Last edited by axper (2013-06-29 07:47:21)

  • Java card simulator and WTK communication problem.

    Hi ,
    I am a newbie to java card .I am doing project on java card based sim.
    For that I am using JavaCard SDK 2.2.2 and WTK 2.5.2 .
    Now when i am trying to connect to cref(java card simulator) from java card midlet,I am getting protocol mismatch error.This is because of WTK runs on slot T=0 and cref runs on T=1.
    then i tried with jcdk3.0.1 classic edition.It provides cref configured to run on both slots T=0 and T=1.
    But when I tried to deploy jcrmi applet on cref running on T=0 i am getting the same error "Protocol mismatch error".
    Can anybody please tell, if there is any way to configure cref to run with T=0?
    Please reply ASAP, as i am stucked with the problem from more than a month.
    Thanks in advance,
    Saviy

    Thanks Anki for replying.
    I am trying to run RMISample from development kit.With steps given in guide as follows
    1.cref -o demoee
    2.Navigate to the
    JC_CLASSIC_HOME\samples\classic_applets\RMIPurse\applet
    directory.
    3.ant all
    it works fine but when i do it with following steps:
    1.cref -o -t0 demoee
    2.Navigate to the
    JC_CLASSIC_HOME\samples\classic_applets\RMIPurse\applet
    directory.
    3.ant all
    i am getting protocol mismatch error.

  • Difference between SAP GUI scripting and eCATT

    HI,
      What is difference between SAP GUI Script and eCATT.
      I know that SAP GUI Script can be used for transaction that have activex controls but can we use these script in eCATT also.
      If yes, how?
    Thanks,
    Priya

    Hi Priya,
    SAPGUI script will only work from an external program, may be VB or vbScript. ECATT can only execute a fixed set of commands e.g. (TCD, SAPGUI etc) or a block of ABAP code. ECATT can both work in foreground and background mode.
    In foreground mode you would be able to see the script running on your frontend whereas background mode will create a job in the SAP system.
    You can convert your SAPGUI scripts to SAPGUI commands and execute. If you strictly want to execute SAPGUI script from ECATT then you would have to save the script somewhere on your desktop computer and call it from an ABAP block in ECATT.
    Bikash

  • "AWT-EventQueue-0" java.lang.NullPointerException and JInternalFrame

    I have two classes one with main method second with GUI methods (JFrame, JInternalFrame). When I call method to start second JInternalFrame from main everything is working but if i call it form any other method i get:
    Exception in thread "main" java.lang.NullPointerException
    at pkg1.GUI.createFrame(GUI.java:123)
    at pkg1.GUI.startFrame2(GUI.java:66)
    at pkg1.Top.cos(Top.java:25)
    at pkg1.Top.main(Top.java:20) My code:
    GUI class
    package pkg1;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Toolkit;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JInternalFrame;
    import javax.swing.JPanel;
    import javax.swing.plaf.basic.BasicInternalFrameUI;
    import oracle.jdeveloper.layout.XYLayout;
    public class GUI
        public JDesktopPane desktop;
        private XYLayout xYLayout1 = new XYLayout();
        public int openFrameCount = 0;
        JFrame f = new JFrame();
        public void GUII()  // Prepare JFrame
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setSize(500, 600);
            f.setVisible(true);
        public void startFrame()
            desktop = new JDesktopPane();
            createFrame(); //create first "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void startFrame2()
            createFrame(); //create second "window"
            f.setContentPane(desktop);
            desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
        public void createFrame()
            MyInternalFrame frame = new MyInternalFrame();
            frame.setVisible(true); //necessary as of 1.3
            desktop.add(frame);
            frame.add(new GUI2());
        } Top class
    public class Top
        public static void main(String[] args)
            GUI g = new GUI();
            g.GUII(); //Create JFrame
            g.startFrame(); //Create JInternalFrame
            Top t = new Top();
            t.sth();
        public void sth()
            GUI gui = new GUI();
            gui.startFrame2();
    } MyIntternalFrame class
    import javax.swing.JInternalFrame;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    import oracle.jdeveloper.layout.XYConstraints;
    import oracle.jdeveloper.layout.XYLayout;
    /* Used by InternalFrameDemo.java. */
    public class MyInternalFrame extends JInternalFrame {
        static int openFrameCount =  0;      
        static final int xOffset = 30, yOffset = 30;
        private XYLayout xYLayout1 = new XYLayout();
        private JButton jButton1 = new JButton();
        private JLabel jLabel1 = new JLabel();
        private JFrame c = new JFrame();
        private JPanel d = new JPanel();
        private XYLayout xYLayout2 = new XYLayout();
        public MyInternalFrame() {         
            super("Document #"  + (++openFrameCount),true /*resizable*/,true /*closable*/,true /*maximizable*/,true);//iconifiable*/
            //...Create the GUI and put it in the window...
            //...Then set the window size or call pack...
            int width = new GUI2().width + 10;
            int height = new GUI2().height + 40;
            setSize(width,height);
            setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
    } Please tel me where is my mistake or maybe you knew another way to open JInternalFrame with public method form another class

    Some possibly helpful suggestions:
    1) Create one JDesktopPane, and do it in the constructor of GUI. You should call this constructor only once.
    2) Get rid of GUII. The GUI constructor will do all this and more.
    3) Get rid of startFrame and startFrame2.
    4) In GUI2, change your width and height to static variables if you are going to use them in outside classes. There is no reason to have to create a GUI2 object just to get those values. Get them from the class, not the instances.
    5) You're doing something funky in your Top class with your mixing of static code and non-static code. My gut tells me that Top is just a static universe that exists to get your code up and running, and that the code within it should all be static, but that's just my personal opinion.
    6) In MyInternalFrame, get the height and width from GUI2 (if that's what you want to do) again in a static fashion. Rather than new GUI2().width which makes no sense, use GUI2.width.
    Why can't you put the button inside of the JInternalFrame object? I believe that the contentPane of this object which may hold your button (unless you embed a jpanel) uses BorderLayout, so you have to take care how you add jcomponents to the jinternalframe (or more precisely, it's contentPane).

  • Windows 8.0 new dual boot GUI disappeared and replaced with text menu after installing updated 8.0 and 8.1

    I upgraded my windows xp to windows 8.0 and my windows 7 to windows 8.1 for a dual boot environment. I am using BCDEDIT program. I had no problem when booting to the GUI menu OF WINDOWS 8 when I first INSTALLED Windows 8. But after the second time
    I booted from a cold start it defaulted back to the old text version of the dual boot menu from the old windows xp and 7 . I have tried many times to restore the boot mgr TO GET BACK THE WINDOWS 8 GUI but I can't seem to put my
    finger on the root cause remedy  that would over-ride the default TEXT VERSION STYLE. I really like the Windows 8 GUI interface. Remember I am not having any problems with booting into the OS of my choice ----- just the BOOTMENUPOLICY.
    Here is where I need to resolve the new from the old command. By the way Does the Bcdedit program need to be installed in both OS'S? And when original Windows 7 was installed the os partitioned a Boot 100mb. I cannot remove or delete it in my Disk Management.
    Just some other tidbits to ponder from any help I would appreciate.
    Thanks
    Michael   

    Hi,
    What's the status of your current system boot option? Please check and make sure Windows 8.1 or Windows 8 was first boot.
    Roger Lu
    TechNet Community Support

  • Firewalls and WTK network access on startup

    There was a recent change in our corporate network, and now the WTK doesn't work for any of our developers. On startup, the emulator shows a blank screen and then exits without giving an error message. If we disable our network cards, we can get the emulator to run, but since our app requires the network, this doesn't do us much good.
    Obviously, our network must have some kind of firewall enabled, and the app must be contacting some sort of server on startup. Does anyone know the specific server that the emulator is trying to contact? Our IT department can't open the firewall unless they know this information.
    Edited by: Radres1 on Jan 30, 2008 5:48 PM

    The warranty entitles you to complimentary phone support for the first 90 days of ownership.
    If you bought the product in the U.S. directly from Apple (not from a reseller), you have 14 days from the date of delivery in which to exchange or return it for a refund. In other countries, the return policy may be different. If you bought from a reseller, its return policy applies.

  • How do I use both a GUI switch and a timer to control an output?

    Hi, I have no trouble setting up either a gui switch or a timer to switch a hardware output. However, now I am trying to use both to control the same output. That is, the latest change of either the timer or gui switch changes the output. I can do this by setting the gui switch output and the timer output into a software latch and connecting the latch to the hardware. The problem is that now the gui switch does not reflect the state of the hardware output (if the timer changed the state). One solution I can see is that there is both a push button 'change state' as well as an indicator at the gui but I would rather have all the functionality in the 1 switch. Any suggestions welcome!

    It looks like you should be using a flip-flop object. This object changes state each time your input transitions from false to true. Also you would probably be better off using a push button rather tham a switch.
    You can tie "your timer OR your pushbutton" to the input of your flip-flop. Then if you display the flip-flop on top of the push button you can easily see which state you are in. Then of course just tie your flip-flop to your output.
    **This will work fine as long as you are NOT running multiple client applications. If you are running multiple clients, then it has to be done completely different. If this is the case please let me know and I will explain.
    Hope this helps

  • Cannot log into any GUI modes and need to reinstall OSX

    Hi all,
    I've been having issues with my iMac 27" i7 desktop which I purchased back in 2011 with OSX Lion.
    I recently updated to OSX Mavericks and have some issues which I am trying to resolve.
    I have been working through troubleshooting with the Apple Support team as it is still covered by the extended warranty that I purchased with the system.  Unfortunately it appears that we have come to the end of their technical support capabilities and I have no resolution.   Here is a quick breakdown of the situation:
    While doing some gaming in a Bootcamp copy of Windows 7 the computer froze and displayed a green screen with vertical lines and was unresponsive.
    Rebooted the machine into OSX Mavericks (upgraded about a month ago from Lion) and after the Apple symbol and loading wheel, when the machine went to display my desktop it froze with a completely white screen.
    Tried to reboot back into Windows 7 and when it went to display the desktop it went to a grey screen with vertical lines.
    Called the Apple Support line who advised me how to log into Safe Mode.   This worked ok and then I rebooted into OSX properly and my desktop displayed albeit running very slow.
    Backed up my data and then while doing some web browsing the computer locked up and went to a blank screen.
    Called the Apple Support line who took me into Recovery Mode and got me to Verify the Disk and Verify Disk Permissions.  Also advised me to run Apple Hardware Test.
    Ran Apple Hardware Test and it said that there are "no problems"
    Booted back into OSX which worked ok but still very slow.
    During a data transfer the computer locked up with a black screen and the rainbow spinning wheel and was unresponsive.
    After a few attempts I was able to log back in and complete my backup of crucial files.
    Yesterday I went to boot the computer and it again gets to point after the Apple symbol and loading wheel where it would display my desktop and goes to blank screen.  Apple Support advised that the next step for testing purposes is to format the HDD and reinstall OSX.
    No matter whether I am trying to boot into OSX, Safe Mode, Recovery Partition or Internet Recovery (I have tried all numerous times) whenever it gets to a point where the GUI would be displayed the machine locks up and I get a blank white screen.  I logged into Single-User Mode and ran a file system check which came up ok and I have run AHT again which came up ok as well, however considering that it doesn't matter where I boot to the same error occurs I believe that the issue is probably hardware related rather than software.  I have also followed the instructions to clear the PVRAM
    I have booted to OSX using Verbose mode and noticed that there are a number of SMC errors and other messages indicating that there may be some software issues, so I am trying to troubleshoot those before I take the machine to the Authorised Apple Repair Centre
    I have created an OSX Mavericks Boot USB but that comes up with a white screen as well if I boot to it.
    I'm not sure if it will help, but I can select my recovery partition (OSX Base System) during boot and load into single user mode there.   I'm curious whether (and how) to run diskutils from there to verify disk and permissions for my primary partition (lets call it "Lion").  Then erase the disk and reinstall OSX from my boot USB.

    You have to start the miniSAP instance before you can log in to it.
    On your desk top there should be an icon 'start SAP WA1' start that, and leave the DOS window running until you are finished.
    If you get messages in the DOS window saying processes died check that MS loopback is running.
    MattG.

  • BEx Analyzer with GUI 720 and MS Office 2010 does not work

    I have recently installed SAP GUI 720 with BEx addon (7 and 3.x) on a computer with Office 2010 and Windows 7.
    All BEx components work fine except Analyzer 7.
    When starting Analyzer 7 nothing happens.
    I have tried instead starting transaction RRMX from a BI system but this generates a short dump.
    Does anyone have an idea about what could be the problem?
    <<text removed>>
    Best regards,
    Didrik
    Edited by: Matt on Sep 22, 2010 8:17 AM

    Hello Didrik von Essen,
    guess its issue with Excel Addins.  i rectified the same issue by enabling the excel addins.go to Application wizard. and change the  please find the screenshot . let me know if it works

  • Java.lang.NullPointerException and ConnectionPool problem

    refresh page , problem gone
    java.lang.NullPointerException
    at Deferment.UpdatePostgraduate.getStatus(UpdatePostgraduate.java:278)
    at Deferment.UpdatePostgraduate.doPost(UpdatePostgraduate.java:175)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    UpdatePostgraduate.java:278
    ->while (rs.next()) {
    175-> tarCount=getStatus(userid);
    now I have
    Connection conn = null;
    CallableStatement calstat=null;
    ResultSet rs = null;
    in every of my function
    and my
    public Connection getConnection()         throws SQLException, ServletException       {           Connection conn = null;           try{           pool.getConnection();           }catch (SQLException sqle) {             throw new ServletException(sqle.getMessage());         }           return conn;       }

    private DataSource pool = null; 
        int tarCount;
        int sendMail;
        @Override
        public void init() throws ServletException {
            Context env = null;
            try {
                env = (Context) new InitialContext().lookup("java:comp/env");
                pool = (DataSource) env.lookup("jdbc/test");
                if (pool == null) {
                    throw new ServletException(
                            "'jdbc/test' is an unknown DataSource");            }
            } catch (NamingException ne) {
                throw new ServletException(ne);
          public Connection getConnection()
            throws SQLException, ServletException
              Connection conn = null;
              try{
             conn=pool.getConnection();
              }catch (SQLException sqle) {
                System.out.println("JDBC error:" + sqle.getMessage());
                sqle.printStackTrace();
              return conn;
          }then on every function I call it like
    private int getFound(String UNumber) throws Exception {
            Connection conn = null;
            CallableStatement calstat=null;
            ResultSet rs = null;
            try {
                conn = pool.getConnection();
                calstat = (CallableStatement) conn.prepareCall("{call DuplicatePost(?)}");
                calstat.setString(1, UNumber);
                rs = calstat.executeQuery();
                tarCount = 0;
                while (rs.next()) {
                    tarCount++;
            } catch (SQLException se) {
                System.out.println("JDBC error:" + se.getMessage());
                se.printStackTrace();
            } catch (Exception e) {
                System.out.println("other error:" + e.getMessage());
                e.printStackTrace();
            } finally {
                try {
                    if (rs != null) {
                        rs.close();
                    if (calstat != null) {
                        calstat.close();
                } catch (SQLException e) {
                    e.printStackTrace();
            } //end finally
            return tarCount;
        }// end function
    }// end

  • GUI Look and Feel

    Hi,
    I am developing GUI's with SWING and I am developing on a Windows XP machine and all my code no matter what I do looks like Windows frames. Is there a trick to get everything to look like "metal" look and feel? I tried numerous techniques that the java tutorials say will alter it but it never does... Is it somthing with XP?
    Thanks,
    Ben

    After a bit of peliminary swing hacking...
    overide javax.swing.plaf.metal.MetalTitlePane.SystemMenuBar.createActions() to return a subclass of the exisiting Maximise action that sets to corrected dimensions.
    subclass createTitlePane in MetalRootPaneUI to return your new class
    then set the metal UI to use your new new RootPaneUI and stand back and feel smug!
    I don't need to do this, but this should work!
    HOWEVER... exactly how you decode where on teh screen the taskbar starts/ends is anybody's guess.

  • What is better/easier  GUI Interface and Code

    I'm trying to write a GUI interface that will constantly update a bunch of variables with whatever the user inputs. Is it better to make a GUI and then try to pass the updates back to other underlying code which is in seperate Classes and methods or is it better to combine the two with the updates right in the GUI code itself.
    Right now I have made the basics of the GUI but I haven't really implemented any underlying code (I've made the robot but I don't have the servos to make it move -- as an analogy). Comments?

    Ideal system design has separation between the view and the underlying data model. Preferrably there is a 3rd intermediary, a controller. That's the MVC design pattern. However, how far you implement that pattern depends on the purpose of the program and the complexity of the data model. A simple program you can probably just implement it all right there in the GUI. It won't follow proper software development principles, but we have those so we can deal with large, complex systems. Another thing to consider is what the user input is used for. If it is not required beyond the GUI then I'd say put it in the GUI (since iot really is part of the GUI). But if it's to be used somewhere else, pass the data to the model.

Maybe you are looking for

  • Purchase Order to Confirmation Link in ODS 0BBP_CON

    Hi, I am trying to get a link between confirmation and PO in ODS 0BBP_CON. I am extracting Confirmation data from EBP (Extended Classic) and corresponding data for PO from R3 through 2LIS_02_HDR, 2LIS_02_ITM, 2LIS_02_SCL. After loading data into 0BBP

  • Trying to use Webutil

    Hi all, I'm just trying to use webutil, following these steps: -Installing webutil according webutil manual - Attach webutil.pll on my form - Copy webutil object group from webutil.olb to my form.Notice that, when i'm trying subclass it, it return no

  • Item category means

    Hello Experts. Please explain me what exactly mean by item category.why it is needed and what are the types of it and what would be the impact of it. Please explain me in a layman language with example. I seen this statement in sd book by glenn willi

  • Forms based system on App server 10.1.2.2 windows server 2008 questions

    Hi guys, We run a 10g forms based MRP system. We converted to 10g 3 years ago and have been selling our system without issue now for that time. The current system has a shelf life of at least 3 more years whilst we develop a new system in 11g and jde

  • Script for extracting pages into separate documents?

    Hi, Using Acrobat 9 Pro on an XP machine, my job entails taking PDFs over 2000 pages long, sorting them into smaller documents based on their contents, and (once they are sorted) breaking down any documents longer than 25 pages into individual PDFs o