GUI program help

I'm writing a GUI program that involves drawing several shapes, lines, and images to a JPanel. Some of the shapes need to be dragged around the screen by the user, while others will remain stationary. I can't figure out the overall organization of how the drawing should be done. Some questions are:
1. what type of code should go in the paintComponent method of JPanel?
2. Should the JFrame class implement MouseListener and MouseMotionListener, or should some other class implement these?
3. Will I have to use inner classes? (In my current design, the class that extends JPanel is an inner class of the JFrame class.)
4. How can I minimize flicker when shapes are repainted?

1. what type of code should go in the paintComponent
method of JPanel?Let's say you have a List of all your Shapes:
private List shapes;
public void paintComponent(Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
    Iterator i = this.shapes.iterator();
    while (i.hasNext()) {
        //Draw your Shape
2. Should the JFrame class implement MouseListener and
MouseMotionListener, or should some other class
implement these?Your pick. I'd have the listeners on your JPanel.
3. Will I have to use inner classes? (In my current
design, the class that extends JPanel is an inner
class of the JFrame class.)Your pick. I prefer using inner classes instead of anonymous classes, but others will say the opposite.
4. How can I minimize flicker when shapes are
repainted?yourPanel.setDoubleBuffered(true);

Similar Messages

  • Running a GUI program with no X?

    Hi,
    I want to run a GUI program on my server, which has no X installed. Of course, the program would normally not run since it needs X (GUI only). I don't really need to be directly using this software, it just needs to run. Anybody here knows if there is any way to fool it into thinking X is there, so it'll still run on my server, preferably as a service in the background?
    PS
    I probably need the same thing for sound too, no alsa or pulse either.
    Any  help's appriciated.

    I probably owe you guys an explanetion: The program in question is Skype. I'm sick and tierd of having skype steal recources when all my other IMing is done in bitlbee. That's why I came up with the following solution: I've done some reading, and turns out skype has a bitlbee plugin.
    However, that plugin uses the skype API which means I can't get around having skype. So, I decided to try the following setup: Run a bitlbee server from my home server. Have skype sorta just run in there doing nothing, and use the bitlebee plugin so I can connect with my own computer and use skype with bitlbee (Note: this is so I can chat with friends, not so I can video / audio chat so I don't care about those features). Basicly that was my idea and i'm exploring the posibility. Skype sadly has no deamon mode, but it does offer a shell pipe login so I'll start skype in my server, and do that setup. Of course now that I see i'll need to install x no matter what i'm not sure if it's worth it. I don't need X on my server for any other purpuse and X will steal recources from my server. I do however love not needing a skype client nativly. Anyone has any experiance / ideas / advice about my idea?
    Stalafin wrote:
    Greenstuff wrote:
    Hi,
    I want to run a GUI program on my server, which has no X installed. Of course, the program would normally not run since it needs X (GUI only). I don't really need to be directly using this software, it just needs to run. Anybody here knows if there is any way to fool it into thinking X is there, so it'll still run on my server, preferably as a service in the background?
    PS
    I probably need the same thing for sound too, no alsa or pulse either.
    Any  help's appriciated.
    Wut? You want to output sound without anything that is able to output sound? Is it me or is that just plain weird....? o.O
    I realize it sounds comfusing but Skype needs somewhere to dump sound apperantly (I found that out on my resharch). So I need a way to fool it into thinking there's such a device.
    Last edited by Greenstuff (2009-11-03 21:24:29)

  • Client-Server side GUI programming

    I want to create a client-server side gui programming with java
    i read this web adress
    http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html
    for information but there are some parts that i didnt understand and wait for your help
    i m trying to build an online-help(live chat) system so when people press the start chat button a java page will appear but i wonder how this will connect to the person who is on server side
    i mean is it possible to 2 users connect the same port and chat with each other
    I mean when user press the chat button the online help supporter will be informed somebody wants to speak with him and they will start a chat
    how can i do something like that
    any help would be usefull thanks

    Below is an example of a client/server program.
    It shows how the server listens for multiple clients.
    * TriviaServerMulti.java
    * Created on May 12, 2005
    package server;
    * @author johnz
    import java.io.*;
    import java.net.*;
    import java.util.Random;
    * This TriviaServer can handle multiple clientSockets simultaneously
    * This is accomplished by:
    * - listening for incoming clientSocket request in endless loop
    * - spawning a new TriviaServer for each incoming request
    * Client connects to server with:
    * telnet <ip_address> <port>
    *     <ip_address> = IP address of server
    *  <port> = port of server
    * In this case the port is 4413 , but server can listen on any port
    * If server runs on the same PC as client use IP_addess = localhost
    * The server reads file
    * Note: a production server needs to handle start, stop and status commands
    public class TriviaServerMulti implements Runnable {
        // Class variables
        private static final int WAIT_FOR_CLIENT = 0;
        private static final int WAIT_FOR_ANSWER = 1;
        private static final int WAIT_FOR_CONFIRM = 2;
        private static String[] questions;
        private static String[] answers;
        private static int numQuestions;
        // Instance variables
        private int num = 0;
        private int state = WAIT_FOR_CLIENT;
        private Random rand = new Random();
        private Socket clientSocket = null;
        public TriviaServerMulti(Socket clientSocket) {
            //super("TriviaServer");
            this.clientSocket = clientSocket;
        public void run() {
            // Ask trivia questions until client replies "N"
            while (true) {
                // Process questions and answers
                try {
                    InputStreamReader isr = new InputStreamReader(clientSocket.getInputStream());
                    BufferedReader is = new BufferedReader(isr);
    //                PrintWriter os = new PrintWriter(new
    //                   BufferedOutputStream(clientSocket.getOutputStream()), false);
                    PrintWriter os = new PrintWriter(clientSocket.getOutputStream());
                    String outLine;
                    // Output server request
                    outLine = processInput(null);
                    os.println(outLine);
                    os.flush();
                    // Process and output user input
                    while (true) {
                        String inLine = is.readLine();
                        if (inLine.length() > 0)
                            outLine = processInput(inLine);
                        else
                            outLine = processInput("");
                        os.println(outLine);
                        os.flush();
                        if (outLine.equals("Bye."))
                            break;
                    // Clean up
                    os.close();
                    is.close();
                    clientSocket.close();
                    return;
                } catch (Exception e) {
                    System.err.println("Error: " + e);
                    e.printStackTrace();
        private String processInput(String inStr) {
            String outStr = null;
            switch (state) {
                case WAIT_FOR_CLIENT:
                    // Ask a question
                    outStr = questions[num];
                    state = WAIT_FOR_ANSWER;
                    break;
                case WAIT_FOR_ANSWER:
                    // Check the answer
                    if (inStr.equalsIgnoreCase(answers[num]))
                        outStr="\015\012That's correct! Want another (y/n)?";
                    else
                        outStr="\015\012Wrong, the correct answer is "
                            + answers[num] +". Want another (y/n)?";
                    state = WAIT_FOR_CONFIRM;
                    break;
                case WAIT_FOR_CONFIRM:
                    // See if they want another question
                    if (!inStr.equalsIgnoreCase("N")) {
                        num = Math.abs(rand.nextInt()) % questions.length;
                        outStr = questions[num];
                        state = WAIT_FOR_ANSWER;
                    } else {
                        outStr = "Bye.";
                        state = WAIT_FOR_CLIENT;
                    break;
            return outStr;
        private static boolean loadData() {
            try {
                //File inFile = new File("qna.txt");
                File inFile = new File("data/qna.txt");
                FileInputStream inStream = new FileInputStream(inFile);
                byte[] data = new byte[(int)inFile.length()];
                // Read questions and answers into a byte array
                if (inStream.read(data) <= 0) {
                    System.err.println("Error: couldn't read q&a.");
                    return false;
                // See how many question/answer pairs there are
                for (int i = 0; i < data.length; i++)
                    if (data[i] == (byte)'#')
                        numQuestions++;
                numQuestions /= 2;
                questions = new String[numQuestions];
                answers = new String[numQuestions];
                // Parse questions and answers into String arrays
                int start = 0, index = 0;
                   String LineDelimiter = System.getProperty("line.separator");
                   int len = 1 + LineDelimiter.length(); // # + line delimiter
                boolean isQuestion = true;
                for (int i = 0; i < data.length; i++)
                    if (data[i] == (byte)'#') {
                        if (isQuestion) {
                            questions[index] = new String(data, start, i - start);
                            isQuestion = false;
                        } else {
                            answers[index] = new String(data, start, i - start);
                            isQuestion = true;
                            index++;
                    start = i + len;
            } catch (FileNotFoundException e) {
                System.err.println("Exception: couldn't find the Q&A file.");
                return false;
            } catch (IOException e) {
                System.err.println("Exception: couldn't read the Q&A file.");
                return false;
            return true;
        public static void main(String[] arguments) {
            // Initialize the question and answer data
            if (!loadData()) {
                System.err.println("Error: couldn't initialize Q&A data.");
                return;
            ServerSocket serverSocket = null;
            try {
                serverSocket = new ServerSocket(4413);
                System.out.println("TriviaServer up and running ...");
            } catch (IOException e) {
                System.err.println("Error: couldn't create ServerSocket.");
                System.exit(1);
            Socket clientSocket = null;
            // Endless loop: waiting for incoming client request
            while (true) {
                // Wait for a clientSocket
                try {
                    clientSocket = serverSocket.accept();   // ServerSocket returns a client socket when client connects
                } catch (IOException e) {
                    System.err.println("Error: couldn't connect to clientSocket.");
                    System.exit(1);
                // Create a thread for each incoming request
                TriviaServerMulti server = new TriviaServerMulti(clientSocket);
                Thread thread = new Thread(server);
                thread.start(); // Starts new thread. Thread invokes run() method of server.
    }This is the text file:
    Which one of the Smothers Brothers did Bill Cosby once punch out?
    (a) Dick
    (b) Tommy
    (c) both#
    b#
    What's the nickname of Dallas Cowboys fullback Daryl Johnston?
    (a) caribou
    (b) moose
    (c) elk#
    b#
    What is triskaidekaphobia?
    (a) fear of tricycles
    (b) fear of the number 13
    (c) fear of kaleidoscopes#
    b#
    What southern state is most likely to have an earthquake?
    (a) Florida
    (b) Arkansas
    (c) South Carolina#
    c#
    Which person at Sun Microsystems came up with the name Java in early 1995?
    (a) James Gosling
    (b) Kim Polese
    (c) Alan Baratz#
    b#
    Which figure skater is the sister of Growing Pains star Joanna Kerns?
    (a) Dorothy Hamill
    (b) Katarina Witt
    (c) Donna De Varona#
    c#
    When this Old Man plays four, what does he play knick-knack on?
    (a) His shoe
    (b) His door
    (c) His knee#
    b#
    What National Hockey League team once played as the Winnipeg Jets?
    (a) The Phoenix Coyotes
    (b) The Florida Panthers
    (c) The Colorado Avalanche#
    a#
    David Letterman uses the stage name "Earl Hofert" when he appears in movies. Who is Earl?
    (a) A crew member on his show
    (b) His grandfather
    (c) A character on Green Acres#
    b#
    Who created Superman?
    (a) Bob Kane
    (b) Jerome Siegel and Joe Shuster
    (c) Stan Lee and Jack Kirby#
    b#

  • NoSuchMethodError in GUI program

    Howdy, I have a GUI program that gets decimal input from the user and converts it to a binary string. It uses JButtons, JTextFields, and JLabels. When I compile and run the program, it says:
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    I really can't figure it out. I have asked everyone around me that knows anything about java to no avail. Thank you. Any help would be greatly appreciated.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.lang.Integer;
    public class binConvertGUI extends JFrame implements ActionListener
           JButton enter = new JButton("Calculate");
           JLabel lbl1 = new JLabel("Enter decimal: ");
           JLabel lbl2 = new JLabel("Binary: ");
           JTextField txt1 = new JTextField(12);
           JTextField txt2 = new JTextField(12);
           JPanel panA = new JPanel();
           JPanel panB = new JPanel();
           String userInA;
           String num;
           int decnum;
           public binConvertGUI()
                  getContentPane().setLayout(
                        new FlowLayout());
                  panA.add(lbl1);
                  panA.add(txt1);
                  panB.add(lbl2);
                  panB.add(txt2);
                  getContentPane().setLayout(
                        new BoxLayout( getContentPane(), BoxLayout.Y_AXIS ));
                  getContentPane().add(panA);
                  getContentPane().add(panB);
                  getContentPane().add(enter);
                  enter.addActionListener(this);
                  txt1.addActionListener(this);
                  enter.setActionCommand("Calculate");
                  txt2.setEditable(false);
           public void actionPerformed(ActionEvent evt)
                  if(evt.getActionCommand().equals("Calculate"))
                        userInA = txt1.getText();
                        decnum = Integer.parseInt(userInA);
                        num = Integer.toBinaryString(decnum);
                        txt2.setText(num);
                  repaint();
           public void main (String[] args) throws NoSuchMethodError
                  binConvertGUI frm = new binConvertGUI();
                  WindowQuitter wquit = new WindowQuitter();
                  frm.addWindowListener( wquit );
                  frm.setSize( 300, 300 );
                  frm.setVisible( true );
    class WindowQuitter extends WindowAdapter
      public void windowClosing( WindowEvent e )
        System.exit( 0 );
    }

    You just forgot the fact that the main() method is always static:
       public static void main (String[] args) throws NoSuchMethodError {
       //...

  • G U I ( I need to add a gui) please help

    I am trying to design an implement a GUI for this program. This program should let the user input the interest rate, principle, and period, and should accumalate value of interest.
    * File: CDInterest.java
    * Tamar Thompson
    * Description: This application program illustrates the use of Java library
    * classes to perform certain useful calculations.
    * It uses the java.lang.Math class to calculate the principal of a
    * Certificate of Deposit (CD) invested at a certain interest rate for a certain
    * time period. It uses the java.text.NumberFormat class to format the numerical results
    * which represent dollar amounts and percentages.
    import java.io.*; // Import the Java I/O Classes
    import java.text.NumberFormat; // For formatting as $nn.dd or n%
    public class CDInterest {
    private BufferedReader input = new BufferedReader // Handles console input
    (new InputStreamReader(System.in));
    private String inputString; // Stores the input
    private double principal; // The CD's initial principal
    private double rate; // CD's interest rate
    private double years; // Number of years to maturity
    private double cdAnnual; // Accumulated principal with annual compounding
    private double cdDaily; // Accumulated principal with daily compounding
    * convertStringTodouble() converts a String of the form "54.87" into
    * its corresponding double value (54.87).
    * @param s -- stores the string to be converted
    * @return A double is returned
    private double convertStringTodouble(String s) {
    Double doubleObject = Double.valueOf(s) ;
    return doubleObject.doubleValue();
    * getInput() handles all the input required by the program. It inputs
    * three Strings and converts each to a (double) number, storing them
    * in instance variables (principal, rate, and years).
    private void getInput() throws IOException {
    // Prompt the user and get the input
    System.out.println("This program compares daily and annual compounding for a CD.");
    System.out.print(" Input the CD's initial principal, e.g. 1000.55 > ");
    inputString = input.readLine();
    principal = convertStringTodouble(inputString);
    System.out.print(" Input the CD's interest rate, e.g. 6.5 > ");
    inputString = input.readLine();
    rate = (convertStringTodouble(inputString)) / 100.0;
    System.out.print(" Input the number of years to maturity, e.g., 10.5 > ");
    inputString = input.readLine();
    years = convertStringTodouble(inputString);
    } //getInput()
    * calcAndReportResults() handles all the interest calculations and reports
    * the program's results. Note the use of Math.pow() to calculate the CD's
    * value, and the use of the NumberFormat.format() methods for making the output
    * look pretty.
    private void calcAndReportResult() {
    // Calculate and output the result
    NumberFormat dollars = NumberFormat.getCurrencyInstance(); // Set up formats
    NumberFormat percent = NumberFormat.getPercentInstance();
    percent.setMaximumFractionDigits(2);
    cdAnnual = principal * Math.pow(1 + rate, years); // Calculate interest
    cdDaily = principal * Math.pow(1 + rate/365, years*365);
    // Print the results
    System.out.println("The original principal is " + dollars.format(principal));
    System.out.println("The resulting principal compounded daily at " +
    percent.format(rate) + " is " + dollars.format(cdDaily));
    System.out.println("The resulting principal compounded yearly at " +
    percent.format(rate) + " is " + dollars.format(cdAnnual));
    } // calcAndReportResult()
    * main() creates an instance of the CDInterest object and then invokes
    * its methods to calculate the interest for a CD using values input by
    * the user.
    public static void main( String args[] ) throws IOException {
    CDInterest cd = new CDInterest();
    cd.getInput();
    cd.calcAndReportResult();
    } // main()
    } // Interest

    Then you are going to have to do a lot of rewriting, because GUI programs don't actively "get" input. (At least they shouldn't.) They passively wait until somebody keys some input into a field or clicks on a button. Have you looked at the Swing tutorial?

  • When i open itunes its normal and then out of nowhere it says "itunes has stopped working" and i have to click 'close program'. help?

    when i open itunes its normal and then out of nowhere it says "itunes has stopped working" and i have to click 'close program'. help?

    Having the same issue here....a quick fix is to just minimize the window, and immediately maximize it.  It will now fit the screen.  Trouble is, after you close it, you'll have to do it again when you re-start itunes.  The good news is it takes all of about 2 seconds.  Apple should fix this.  Should.

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • Freely Programmed help in Pop Up Window

    Hi,
      Is it possible to display the data of freely programmed help in the pop up window.
    Thanks
    Raghavendra

    Hi Thomas,
       I agree that by using Freely Programmed help the data will be displayed in a seperate window. I want to display the data in a window( of type Pop Up) because i am displaying table control with 3 fields on clicking f4 and it has 2 buttons Ok and Cancel. But if there are 50 entries the user needs to scroll down to click on Ok. If the window is of type pop up Ok button will be embedded in the window instead of on view.
    Thanks
    Raghavendra

  • Freely programmed help in ALV

       HI:ALL
          How to achieve  Freely programmed help in ALV?

    Hi,
    On APPLY buttton action, write the below code
    *Fire the event to indicate that data selection is done
    wd_comp_controller->fire_vh_data_selected_evt( ).
    wd_comp_controller->value_help_listener->close_window( ).
    *Raise Event
       cl_fpm_factory=>get_instance( )->raise_event_by_id( EXPORTING   iv_event_id   = '<custom event name>').
    And in PROCESS_EVENT of your webdynpro component(where Freely Programmed search help is implemented) write the code as per your requirement to set the values back to the table.
    CASE IO_EVENT->MV_EVENT_ID.
              WHEN '<CUSTOM EVENT NAME>'.
                        write code as per your requirement.
    ENDCASE.
    Thanks
    KH

  • N95 Maps Program Help and Suggestions Anybody??

    N95 Maps Program Help and Suggestions Anybody??
    havnt updated to firmware v12 yet
    Why can't I search my Address or Current Location and then save this as HOME or say my Start_Point_01?
    I have managed to save my HOME as a PEOPLE LOCATION and my friends address etc and worked out
    how to plan a route etc, BUT Maps GPS POSITION thinks I live 20 miles away??
    I dont seem to be able to simply set my HOME or Current Location myself,
    I have seen some Satelite activity but insists I live 20 miles away :/ how do I fix this,
    it's realy annoying. any handy tips people??
    cant upgrade firmware as need phone plugged into wall socket
    at webcafe, will have to wait for firmware :/
    N95-1 (8GB-MicroSD),LCG-Audio,Fring,Nimbuzz,Skype,Youtube,iPlayer,Garmin4-GPS.Googlemaps,SkyFire,ZoneTag,Gravity, Sennheiser CX-400-IIs,500-IIs,TR-120 Wireless,HD215'S.AudioTechnica ATX-M50's.BT B-Tube BT Speaker.

    The least problems you'll have with miniDV cameras. About any miniDV camera will connect to a Mac via Firewire. HDD cameras are an open invitation to trouble, especially as you speak of older computers.
    There are well-featured models out there now for 2-300 bucks. But watch out for cameras that connect to the computer via a dock. I had two Sony with these @#$% docking stations .... both docks broke and rendered the cameras useless for capturing. replacing the dock was nearly the price of a new cam.

  • What Is Wrong With My Program Help

    This Is The Assignment I Have To Do:
    Write a Java program that prints a table with a list of at least 5 students together with their grades earned (lab points, bonus points, and the total) in the format below.
    == Student Points ==
    Name Lab Bonus Total
    Joe 43 7 50
    William 50 8 58
    Mary Sue 39 10 49
    The requirements for the program are as follows:
    1.     Name the project StudentGrades.
    2.     Print the border on the top as illustrated (using the slash and backslash characters).
    3.     Use tab characters to get your columns aligned and you must use the + operator both for addition and string concatenation.
    4.     Make up your own student names and points -- the ones shown are just for illustration purposes. You need 5 names.
    This Is What I Have So Far:
    * Darron Jones
    * 4th Period
    * ID 2497430
    *I recieved help from the internet and the book
    *StudentGrades
      public class StudentGrades
         public static void main (String[] args )
    System.out.println("///////////////////\\\\\\\\\\\\\\\\\\");
    System.out.println("==          Student Points          ==");
    System.out.println("\\\\\\\\\\\\\\\\\\\///////////////////");
    System.out.println("                                      ");
    System.out.println("Name            Lab     Bonus   Total");
    System.out.println("----            ---     -----   -----");
    System.out.println("Dill             43      7       50");
    System.out.println("Josh             50      8       58");
    System.out.println("Rebbeca          39      10      49");When I Compile It Keeps Having An Error Thats Saying: "Illegal Escape Character" Whats Wrong With The Program Help Please

    This will work exactly as you want it to be....hope u like it
         public static void main(String[] args)
              // TODO Auto-generated method stub
              System.out.print("///////////////////");
              System.out.print("\\\\\\\\\\\\\\\\\\\\\\\\");
              System.out.println("\\\\\\\\\\\\\\");
              System.out.println("== Student Points ==");
              System.out.print("\\\\\\\\\\\\\\");
              System.out.print("\\\\\\\\\\\\");
              System.out.print("\\\\\\\\\\\\");
              System.out.print("///////////////////");
              System.out.println(" ");
              System.out.println("Name Lab Bonus Total");
              System.out.println("---- --- ----- -----");
              System.out.println("Dill 43 7 50");
              System.out.println("Josh 50 8 58");
              System.out.println("Rebbeca 39 10 49");
         }

  • Free ide for gui programming

    can someone tell me what's the best free java ide for gui programming?

    No one can answer the question of which one is better. It's like answering the question - is red more beautiful than yellow?
    I can however say that the plugins into eclipse which lets you build swing ui by drag and drop are not mature, and I don't think they work if you modify the code by hand, and then want to go back into "drag % drop" mode. The ui builder in jbuilder is nice, and doesn't clutter the code, and it works even if you have modified the code by hand.
    /kaj

  • Gui programming Python

    Hi All,
    I'm looking to improve / learn more on gui programming within python.
    I'm not sure if i should be writing the code manualy or using the libglade / glade designer to produce results.
    My main aim with most of my programming is to keep things slim. i use openbox so i don't want to pull in loads of gnome crap to make something work.
    How do you guys go about it etc?
    Regards
    Matthew

    I guess your options are pyQt, pyGtk, Tkinter (included with python), and wxPython.
    I've been playing around with wxpython for a little while now and I quite like it. I really enjoy that it is fairly cross platform (without requiring gtk, qt, or tk/tcl on Windows or Mac) and the wxpython demo program is just fantastic.
    IIRC, the demo isn't packaged with wxpython in Arch, but you can download it separately and extract it to a folder in your home directory with no problems.

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

  • Best way for gui programming? swing awt jfc swt ....

    hi,
    i have been programming java for some time but exclusively for web, servlets, jsp etc..
    but now i have to do some �real� gui�s. I have no gui experience , (ok I did some basic examples just to see how things work) but/and I�m not able to determine which way I should go.
    So I did some google search and read some threads here im forum on topics swing vs. awt (or so) and found lot of topics with lot of different opinions(some of them also a little bit out of date) so now im CONFUSED more then ever.
    I read people asking questions like :what is better awt or swing and then getting the perfect technical answers like :
    AWT components are NOT native components. AWT components are Java objects. Particular instances of AWT componets (Button, Label, etc.) MAY use peers to handle the rendering and event handling. Those peers do NOT have to be native components. And AWT components are NOT required to use peers for themselves at all.
    Or
    There are some significant differences between lightweight and heavyweight components. And, since all AWT components are heavyweight and all Swing components are lightweight (except for the top-level ones: JWindow, JFrame, JDialog, and JApplet), these differences become painfully apparent when you start mixing Swing components with AWT components.
    But I don�t care that much(at least not now) about this detail answers.
    I would simply like to know from some experienced gui guru, (due to the fact that we have 2005 and java 1.5) if u would like to learn gui in java quickly and know everything u know now which way would u choose:
    AWT
    JFC
    SWING
    SWT
    And which IDE would u use.
    I simply want to get quickly started and do some basic gui programming ,nothing special, but I would like to avoid that after weeks of doing one, then find out the was the wrong one and again learn the another one.
    TIA Nermin

    try swt vs swing and see what you think, its not really a decision someone else can make for you. as long as you don't try and mix the two, it should be a similar learning curve either way.

Maybe you are looking for

  • Apple Mail quits daily, runs slow on my new Intel iMac

    I have used Apple Mail for years and love it. Since I switched to Intel 24" iMac it has been a different story. Mail quits unexpectedly 2 to 3 times per day. Plus it runs real slow, had to scrap all my smart folders to try to speed up. Any ideas anyo

  • JVM Crash with big applications (swing)?

    We have a big application (C/S, Swing) with more than 1000 GUI's. When I navigate over 60/70 GUI's, the jvm crash and shows: --------- UNCAUGHT EXCEPTION --------- --------- UNCAUGHT EXCEPTION --------- --------- UNCAUGHT EXCEPTION --------- --------

  • Can't open Microsoft Office, Netscape, FileChute...

    Leopard worked fine (kind of) until yesterday when I noticed I couldn't open Word, Excel, PowerPoint. Called Apple and was referred to Microsoft. Called Microsoft and went through all the troubleshooting and determined (correctly) that it was an Appl

  • How to insert date into oracle database

    Hi, there, I want to insert date information to oracle database in a jsp page using JSTL. but always got wrong message: javax.servlet.jsp.JspException: INSERT INTO DATE_TEST (date_default,date_short,date_medium) values(?,?,?) : Invalid column type I

  • Clipboard option in VC does not show graph

    Hi All,    I am working on Visual  Composer (NW2004s SP11). I am working with BI as back end. I want graph to be copied in Excel sheet when I give Clipboard button. In Action I am giving Export Data - Export To Screen. I am getting the table princopi