Viewing Swing GUI  in Eclipse Galileo IDE

Hi,
I have created a client GUI which I'd like to view but my application is not complete, still need to define pages that control the context menu that will display the gui. Is there a way/ plugins to view gui before completion?
Thanks.

the best is your own mind and fingers.

Similar Messages

  • How to view Swing sources in Eclipse

    HI all,
    I work with Eclipse and I want to through Swing code to analyse what is processed.
    I know it is possible to view Swing source, but I can find the Swing sources in the java jdk delivery.
    How can I do that?
    Thanks.
    Herve.

    Well something is missing.
    Just below, I give you 2 lines of the calling stack. The first is my code with the current line, which is 41. My code is called from some Swing code and you can see that the caller line is not available. So when I move forward with Step Over, I can see the swing code, but the current line is lost!
    JComboBoxWrapped$Model.getSelectedItem() line: 41     
    JComboBox.setModel(ComboBoxModel) line: not available

  • How to create split development directory environment using Eclipse Galileo

    Hello there!
    Well my question is on the subject... i want to use my Eclipse Galileo IDE to develop applications but i don't know hoe to set the develop structure for that... how can i set the build path? Should i add al the *.jar on weblogic lib?
    I know about Workshop Studio but i don't understand it :_
    If any of you have a tutorial for this it would be great...
    Thanx in advance!

    Hi,
    You can start with this:
    http://docs.oracle.com/cd/E17904_01/doc.1111/e15866/tasks.htm
    Cheers,
    Vlad

  • How to debug a swing application using eclipse IDE

    plz tell me how can i approach to understand SWING GUI application using eclipse debugging procedure.
    for example:
    i would like to know how the program flow is, for creating a particular screen.
    how to approach my SWING application flow eaasily... plz suggest me anyone!!!

    avula wrote:
    plz tell me how can i approach to understand SWING GUI application using eclipse debugging procedure.
    for example:
    i would like to know how the program flow is, for creating a particular screen.
    how to approach my SWING application flow eaasily... plz suggest me anyone!!!Add break points and step through the code, you can examine the stack, and variables in the debug perspective .

  • Issue viewing Swing components

    I currently am able to compile, but not view Swing components. I am running Windows Media Center Edition with Radeon X300 graphics card. Swing programs execute but I only see the border window with only grey content inside. I have 1gb of memory and have tried running very small applications with the same effect. Does Java not support my OS? Any ideas?

    Some sample code follows that doesn't work for me
    At odd times I can see some of the swing applications I try to run, but it isn't consistent. This makes me think it is a memory problem, but I'm not sure. The following application takes 19,040 K with 373688 K available physical memory.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class DefaultButton {
    public static void main(String args[]) {
    Runnable runner = new Runnable() {
    public void run() {
    JFrame frame = new JFrame("DefaultButton");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setLayout(new GridLayout(2, 2, 10, 10));
    JButton button1 = new JButton("Text Button");
    button1.setMnemonic(KeyEvent.VK_B);
    frame.add(button1);
    Icon warnIcon = new ImageIcon("Warn.gif");
    JButton button2 = new JButton(warnIcon);
    frame.add(button2);
    JButton button3 = new JButton("Warning", warnIcon);
    frame.add(button3);
    String htmlButton = "<html><sup>HTML</sup> <sub><em>Button</em></sub><br>" +
    "<font color=\"#FF0080\"><u>Multi-line</u></font>";
    JButton button4 = new JButton(htmlButton);
    frame.add(button4);
    JRootPane rootPane = frame.getRootPane();
    rootPane.setDefaultButton(button2);
    frame.setSize(300, 200);
    frame.setVisible(true);
    EventQueue.invokeLater(runner);
    }

  • In this case, can I modify swing GUI out of swing thread?

    I know the Swing single thread rule and design (Swing is not thread safe).
    For time-consuming task, we are using other thread to do the task and
    we use SwingUtilities.invokeAndWait() or SwingUtilities.invokeLater (or SwingWorker) to update Swing GUI.
    My problem is, my time-consuming task is related to Swing GUI stuff
    (like set expanded state of a huge tree, walk through entire tree... etc), not the classic DB task.
    So my time-consuming Swing task must executed on Swing thread, but it will block the GUI responsivity.
    I solve this problem by show up a modal waiting dialog to ask user to wait and
    also allow user to cancel the task.
    Then I create an other thread (no event-dispatch thread) to do my Swing time-consuming tasks.
    Since the modal dialog (do nothing just allow user to cancel) is a thread spawn by
    Swing event-dispatch thread and block the Swing dispatch-thread until dialog close.
    So my thread can modify Swing GUI stuff safely since there are no any concurrent access problem.
    In this case, I broke the Swing's suggestion, modify Swing stuff out of Swing event-dispatch thread.
    But as I said, there are no concurrent access, so I am safe.
    Am I right? Are you agree? Do you have other better idea?
    Thanks for your help.

    If you drag your modal dialog around in front of the background UI, then there is concurrent access: paint requests in your main window as the foreground window moves around.

  • Need help with threading in Swing GUI !!!

    I've written an app that parses and writes
    files. I'm using a Swing GUI. The app
    could potenially be used to parse hundreds or even
    thousands of files. I've included a JProgressBar
    to monitor progress. The problem is when I parse
    a large number of files the GUI freezes and only
    updates the values of the progress bar when the
    parsing and writing process is finished.
    I assume I need to start the process in a seperate thread. But, I'm new to threads and I'm not sure
    whether to start the Progressbar code in a seperate
    thread or the parsing code. As a matter of fact I really
    don't have any idea how to go about this.
    I read that Swing requires repaints be done in the
    event dispatch thread. If I start the parsing in a seperate
    thread how do I update the progressbar from the other
    thread? I'm a thread neophyte.
    I need a cigarette.

    In other words do this:
    Inside event Thread:
    handle button action
    start thread
    return from action listener
    Inside worker Thread:
    lock interface
    loop
    perform action
    update progress bar
    unlock interface
    return from worker ThreadDoesn't updating the progress bar (and locking/unlocking the interface components) from within the worker thread violate the rule that you shouldn't mess with Swing components outside the event thread? (Do I have that rule right?)
    In any case, is there any way to just post some kind of event to the progress bar to update it from within the worker thread, thereby insuring that the GUI progress bar update is being invoked from the event thread? This would also obviate the need to use a timer to poll for an update, which I think is a waste especially when the monitored progress is at a variable rate, (or for number crunching, is executing on different speed machines).
    Also, doesn't using invokeLater() or invokeAndWait() still block the event dispatching thread? I don't understand how having a chunk of code started in the event thread doesn't block the event thread unless the code's executed in a "sub-thread", which would then make it not in the event thread.
    I'm also looking to have a progress bar updated to monitor a worker thread, but also want to include a "Stop" button, etc. and need the event queue not to be blocked.
    The last thing I can think of is to implement some kind of original event-listener class that listens to events that I define, then register it with the system event queue somehow, then have the worker thread post events to this listener which then calls setValue() in the progress bar to insure that the bar is updated from the event queue and when I want it to be updated. I don't know yet if it's possible to create and register these kinds of classes (I'm guessing it is).
    Thanks,
    Derek

  • Visual Swing Designer (for Eclipse)

    Hi there
    We've developed a client software with JBuilder. Now we want to move
    the whole project to eclipse.
    Is there a good plugin for Eclipse to design Swing applications? I haven't found one so far.
    JBuilder has a Swing designer, and it is very usable for us. Eclipse
    hasen't such a Swing designer...
    It could also be a external tool, to design our Swing Panels. But it
    has to be a visual Designer tool for swing, like the one for VisualStudio and co.
    Does anybody know a good Designer WORKING Tool? Maybee as plugin for eclipse?
    Greetings,
    Adrian

    Hi,
    It would be good to have some feedback about Swing GUI builders for Eclipse, are they usable and good. I heard much good things on Eclipse and am curious to try (althought NetBeans are still very good for me), but I develop Swing application and porting to SWT is unacceptable for me (it is not so advanced as Swing and I need many features that are in Swing only).

  • Recommended Tool for devloping Swing GUI's?

    Hello everyone.
    I was wondering what a good tool kit was for building swing gui's?
    I heard NetBean was one, any others you recommend?
    Currently I use Rational Software Architect to do all my java coding but I don't see any options in this IDE for creating drag and drop GUI development.
    Thanks!

    You have 2 very different answers to consider. Before making your final decision, I'd ask yourself, which of the two responders is a Swing expert and which isn't. That should put a whole lot of added weight to one of the recs. Just my two scheckel's worth.

  • Launch swing GUI on MAC

    I developed a swing GUI recently. It works perfectly under Linux, Unix, Windows, but the users of the GUI will run it on MAC. I haven't any idea about MAC. Does anybody give me some suggestions about
    How to launch my application on mac?
    Are there any strategies or tricks for running a swing GUI on MAC?
    How can I put a shortcut or icon on user's desktop of mac so that when the user click it, my swing gui can open immediately?
    Thank a million in advance

    Well... on Mac OS X, it is very easy. You just put your application in a .jar file. On Mac OS X, jar files are automatically run when double clicked. You won't have to worry about downloading a jdk, because it is integrated with the system.
    Mac OS 9 however only made it to jdk version 1.1.8, and you will have to use the Bindary program to make it runnable. Strongly suggest users to upgrade to Mac OS X, because on 9, it is a pain...
    With pleasure,
    Wannes.

  • Java Swing GUI Button Image

    Hi, I really need help with this one, I have tried many things and looked at many pages for this but to no avail as of yet.
    I have a Swing GUI in which I want to display an image. The way I am displaying it at the moment is as a button icon as I do not need to be able to alter the images. I can also use the button functionality as displaying something when the image is clicked. So I have an array of image paths which are accesed to load an image into the button and a "Next" button to change the image as required.
    My problem is that when I load an image into the button it moves from it's original location. When there is no image displayed the button is where I want it to be, but when I load an image it moves, this cannot happen. Any ideas.
    Also, when I am trying to click thru the array of images, it starts at the 1st image in the array but then skips to the last image in the array. Here is the code for that.
    // Handle events that arise from the "Next" button being clicked
    private void jButton5MouseClicked(java.awt.event.MouseEvent evt) {
    if (jComboBox1.getSelectedIndex() == 1)
         for (int i = 1; i < juniorImageIndex.length; i++)
         jButton8.setIcon(new javax.swing.ImageIcon(juniorImageIndex));
    else if (jComboBox1.getSelectedIndex() == 2)
         for (int i = 1; i < seniorImageIndex.length; i++)
         jButton8.setIcon(new javax.swing.ImageIcon(seniorImageIndex[i]));
    juniorImageIndex and seniorImageIndex are obviuosly the arrrays with the file paths for the images. The reason I start at index 1 is that I use the 0 index image as the starting image for each part.
    Any help gratefully appreciated, I really hope someone can help, Thanks.

    // Handle events that arise from the "Next" button
    being clicked
    private void
    jButton5MouseClicked(java.awt.event.MouseEvent evt) {
      myImageIndex =(myImageIndex + 1) % imageArray.size();
      resetButtonImage();
    private void resetButtonImage() {
    if (jComboBox1.getSelectedIndex() == 1)
    {//take this out
    //> for (int i = 1; i < juniorImageIndex.length; i++)
    //> {
    jButton8.setIcon(new//> javax.swing.ImageIcon(array[myImageIndex]));
    //> }
    else if (jComboBox1.getSelectedIndex() == 2)
    {//this too
    //> for (int i = 1; i < seniorImageIndex.length; i++)
    //> {
    jButton8.setIcon(new
    javax.swing.ImageIcon(array2[myImageIndex]));//> }

  • Swing gui code generator

    Since I find Swing LayoutManagers very hard to learn, I would like to know if there is something like a swing gui code generator....
    kevin

    All of the IDEs have WYSIWYG GUI editors where you can interactively change a layout manager and see the effect instantly.
    Check out: Forte, JBuilder or VisualCafe - and, no doubt, a multitude of others.

  • Swing/GUI Strategy

    My Swing GUI has a JMenuBar with several items. The main panel has a "controls" pane and an "results" pane. The results must be displayed when selecting options/actions on the "controls" pane.
    However, I want the contents of the "controls" pane to depend on the menu item selected.
    What should be my strategy to achieve this?
    My best guess would be to create all of the "controls" panes and only show one of them when using the menu. But I need a litlle bit more help on this.
    Thanks,
    joozju

    CardLayout seems helpful. Although I seem to have some problem with the cl.show() method. The other cards are not drawn when I select a menuitem:
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JLabel;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JPanel;
    import javax.swing.KeyStroke;
    import javax.swing.UIManager;
    import javax.swing.UnsupportedLookAndFeelException;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test implements ActionListener {
    JPanel controlCardsPanel;
    JPanel ccDef, ccOne, ccTwo;
    public static void main(String[] args) {
    try{
    UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (UnsupportedLookAndFeelException e) {
    e.printStackTrace();
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    } catch (InstantiationException e) {
    e.printStackTrace();
    } catch (IllegalAccessException e) {
    e.printStackTrace();
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    private static void createAndShowGUI() {
    JFrame.setDefaultLookAndFeelDecorated(true);
    JFrame frame = new JFrame("Test - Under Construction");
    Test t = new Test();
    frame.setJMenuBar(t.createMenuBar());
    frame.setContentPane(t.createContentPane());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
    public JPanel createContentPane() {
    JPanel jp = new JPanel(new BorderLayout(5,5)); //BorderLayout must be defined here
    jp.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
    jp.setPreferredSize(new Dimension(640, 480));
    jp.setBackground(Color.LIGHT_GRAY);
    ccDef = new JPanel();
    ccDef.add(new JLabel("Use the Menu"));
    ccOne = new JPanel();
    ccOne.add(new JLabel("Press One"));
    ccOne.add(new JButton("One"));
    ccTwo = new JPanel();
    ccTwo.add(new JLabel("Select Two"));
    ccTwo.add(new JCheckBox("High"));
    ccTwo.add(new JCheckBox("Low"));
    CardLayout cl = new CardLayout();
    controlCardsPanel = new JPanel();
    controlCardsPanel.setLayout(cl);
    controlCardsPanel.add(ccDef, "I am ccDefault");
    controlCardsPanel.add(ccOne, "I am ccOne");
    controlCardsPanel.add(ccTwo, "I am ccTwo");
    jp.add(controlCardsPanel, BorderLayout.LINE_START);
    jp.setOpaque(true);
    return jp;
    public JMenuBar createMenuBar() {
    //Create menu bar
    JMenuBar jmb = new JMenuBar();
    //Build File menu
    JMenu fileMenu = new JMenu("File");
    fileMenu.setMnemonic(KeyEvent.VK_F);
    //Add Control One MenuItem
    JMenuItem fileMenuControlOne = new JMenuItem("Card One");
    fileMenuControlOne.setActionCommand("ccOne");
    fileMenuControlOne.addActionListener(this);
    fileMenu.add(fileMenuControlOne);
    //Add Control Two MenuItem
    JMenuItem fileMenuControlTwo = new JMenuItem("Card Two");
    fileMenuControlTwo.setActionCommand("ccTwo");
    fileMenuControlTwo.addActionListener(this);
    fileMenu.add(fileMenuControlTwo);
    //Add Quit MenuItem
    JMenuItem fileMenuQuit = new JMenuItem("Quit");
    fileMenuQuit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));
    fileMenuQuit.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    System.exit(0);
    fileMenu.add(fileMenuQuit);
    jmb.add(fileMenu);
    return jmb;
    public void actionPerformed(ActionEvent ae) {
    CardLayout cl = (CardLayout)(controlCardsPanel.getLayout());
    cl.show(controlCardsPanel, (String)ae.getActionCommand());
    }I expect the othe cards to appear when I select "Card One" from the File menu. But they don't. I use the Ctrl-F11 key in eclipse when I test my app.
    Thanks,
    Joost

  • Swing GUI RAD

    Does any body know any swing GUI rapid application development kits?
    if possible, free (I'm just a poor student), if not free, just let me know the name.

    JBuilder - not free but really good.PE (personal edition) is free.
    search for best IDE (intergrated development everoment).

  • Loading large files in Java Swing GUI

    Hello Everyone!
    I am trying to load large files(more then 70 MB of xml text) in a Java Swing GUI. I tried several approaches,
    1)Byte based loading whith a loop similar to
    pane.setText("");
                 InputStream file_reader = new BufferedInputStream(new FileInputStream
                           (file));
                 int BUFFER_SIZE = 4096;
                 byte[] buffer = new byte[BUFFER_SIZE];
                 int bytesRead;
                 String line;
                 while ((bytesRead = file_reader.read(buffer, 0, BUFFER_SIZE)) != -1)
                      line = new String(buffer, 0, bytesRead);
                      pane.append(line);
                 }But this is gives me unacceptable response times for large files and runs out of Java Heap memory.
    2) I read in several places that I could load only small chunks of the file at a time and when the user scrolls upwards or downwards the next/previous chunk is loaded , to achieve this I am guessing extensive manipulation for the ScrollBar in the JScrollPane will be needed or adding an external JScrollBar perhaps? Can anyone provide sample code for that approach? (Putting in mind that I am writting code for an editor so I will be needing to interact via clicks and mouse wheel roatation and keyboard buttons and so on...)
    If anyone can help me, post sample code or point me to useful links that deal with this issue or with writting code for editors in general I would be very grateful.
    Thank you in advance.

    Hi,
    I'm replying to your question from another thread.
    To handle large files I used the new IO libary. I'm trying to remember off the top of my head but the classes involved were the RandomAccessFile, FileChannel and MappedByteBuffer. The MappedByteBuffer was the best way for me to read and write to the file.
    When opening the file I had to scan through the contents of the file using a swing worker thread and progress monitor. Whilst doing this I indexed the file into managable chunks. I also created a cache to further optimise file access.
    In all it worked really well and I was suprised by the performance of the new IO libraries. I remember loading 1GB files and whilst having to wait a few seconds to perform the indexing you wouldn't know that the data for the JList was being retrieved from a file whilst the application was running.
    Good Luck,
    Martin.

Maybe you are looking for