Help on GUI overlay

I'm trying to convert a small multi-class program from pure text based output into a GUI program. I've created my GUI in Java Studio Enterprise 8.1 and imported all my classes into the workspace. The program (a simple ATM) works, but I'd like to apply a GUI format.
Now the question: Do I need to rewrite code in GUI format, or can i implement my classes with calls from my GUI.
I've searched the net for 2 days now and have yet to find a guide that takes an existing package and converts it to a GUI.
Any links would be much apreciated,
Thanks
lgmiii

Hi,
Create the UI and let the UI use the classes that you already have written. You might have to update/modify some of your code.
Kaj

Similar Messages

  • Digital Publishing Suite Help | Web Content overlays

    This question was posted in response to the following article: http://helpx.adobe.com/digital-publishing-suite/help/web-content-overlays.html

    Hi - I have followed these instructions, and can see my web content when I preview in InDesign. However, when I publish to an Interactive PDF it doesn't appear. I'm in InDesign 6 and Adobe Acrobat 9 Standard. Any thoughts on what I could be doing wrong?

  • Urgent! Need help in GUI!

    Hi, I am doing a small java project and I am expected to code all the GUI I need in just one class file. Can someone help me? My GUI consists of 2 JButtons, 2 JLabels and 1 JTextField. Also I need to have ActionListener for both of the buttons all in just 1 class file. Anyone please help. It is better if you can provide me with some sample coding to view

    That sounds like a very arbitrarily cooked-up requirement. Homework?
    Assuming your class needs to be a component itself, simply add the buttons, labels and fields into it, typically within the constructor.
    If you mean "one source file" then I would advise using an inner class as your ActionListener; you may even want two. You may like to use anonymous classes which, for instance, call methods in your outer class. All of these solutions will produce more than one class file from the single source file.
    If you really do mean "one class file" then you will need your outer class to implement ActionListener and determine from the getActionCommand() or getSource() methods which of the two buttons the event emanated from. It's a less clean way of going about it, but you get your single class file.
    No sample code - if you need further explanation of the above then just Google for the underlined terms.

  • Help with GUI (calling one class from other class)

    Hi everybody,
    I am new at GUI and I need your help..
    I have a JPanel, named "holdAll", layout of which is set to BorderLayout. I have implemented all other JPanels in different class files. For example, I have TopPanel, LeftPanel, etc. as shown below
    LeftPanel myLeft = new LeftPanel();
    holdAll.add(myLeft, BorderLayout.WEST);
    RightPanel myRight = new RightPanel();
    holdAll.add(myRight, BorderLayout.EAST);
    TopPanel myTop = new TopPanel();
    holdAll.add(myTop, BorderLayout.NORTH);
    MiddlePanel myMiddle = new MiddlePanel();
    holdAll.add(myMiddle, BorderLayout.CENTER);
    BottomPanel myBottom = new BottomPanel();
    holdAll.add(myBottom, BorderLayout.SOUTH);
    That works well but I have difficulties in ActionListeners.. For example, in my TopPanel class I have the code below:
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == btnInsert) {
    int returnVal = fc.showOpenDialog(fc);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    myImage newImage = new myImage(file);
    System.out.println(newImage.myHashCode());
    Here, if I have upload new image, then I have to update the listImage in the LeftPanel class.. But, I could not access the lstImage object in the LeftPanel class from the actionListener event in the TopPanel class.
    What should I do? Is my design poor?

    public class TopPanel extends JPanel implements ActionListener { //it doesn't allow "extends JPanel, Observable"
    JFileChooser fc;
    JButton btnInsert;
    JButton btnDelete;
    public TopPanel() {
    setLayout(new FlowLayout());
    setBorder(BorderFactory.createBevelBorder(1, Color.WHITE, Color.GRAY));
    btnInsert = new JButton("Insert");
    btnDelete = new JButton("Delete");
    JLabel myLabel = new JLabel(" Search : ");
    JTextField txtSearch = new JTextField();
    txtSearch.setColumns(20);
    JToolBar searchToolBar = new JToolBar();
    fc = new JFileChooser();
    btnInsert.addActionListener(this);
    searchToolBar.add(btnInsert);
    searchToolBar.add(btnDelete);
    searchToolBar.add(myLabel);
    searchToolBar.add(txtSearch);
    add(searchToolBar);
    public void actionPerformed(ActionEvent e) {
    if (e.getSource() == btnInsert) {
    int returnVal = fc.showOpenDialog(fc);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
    File file = fc.getSelectedFile();
    *//Here I want to send fc.GetName() to the JList in the LeftPanel*
    my LeftPanel class is below:
    public class LeftPanel extends JPanel{
    public LeftPanel(){
    this.setLayout(new BorderLayout());
    setBorder(BorderFactory.createBevelBorder(1, Color.WHITE, Color.GRAY));
    JPanel pnlButtons = new JPanel();
    JButton btnName = new JButton("Name");
    JButton btnSize = new JButton("Size");
    JButton btnDate = new JButton("Date");
    pnlButtons.add(btnName);
    pnlButtons.add(btnSize);
    pnlButtons.add(btnDate);
    pnlButtons.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    JPanel pnlImage = new JPanel();
    JList lstImage = new JList();
    lstImage.setVisible(true);
    pnlImage.add(new JScrollPane(lstImage));
    add(pnlButtons, BorderLayout.NORTH);
    add(pnlImage, BorderLayout.CENTER);
    Is there any simple way?

  • Need help in GUI

    I need help in coding for GUI
    I have created 4 classes which are car, car4sale,dealer and the GUI.
    in dealer class I have created a hash table and I want my data to be stored in this hash table can any one help me plz
    my GUI should be build on text field.
    But I don't know how can I link the GUI to the classes.
    this is the GUI but not complete.
    package Carsale;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    class Button extends JFrame implements ActionListener {
    private JButton button;
    private JTextField textField;
    public static void main(String[] args){
    Button frame = new Button();
    frame.setSize(400,300);
    frame.createGUI();
    frame.show();
    private void createGUI(){
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    Container window = getContentPane();
    window.setLayout(new FlowLayout());
    button = new JButton("VRN");
    window.add(button);
    button.addActionListener(this);
    textField = new JTextField(10);
    window.add(textField);
    public void actionPerformed(ActionEvent event) {
    textField.setText("Button clicked");
    }

    In the future, Swing related questions should be posted in the Swing forum.
    Your question does not have enough information to help you. We can't write a GUI for you. You need to write your own and then ask a specific question when you have a problem.
    Start by reading the [url http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]Swing Tutorial which has lots of examples of creating simple GUIs.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.

  • I need help in GUI

    Hi every one..
    I need help in this class. I want to do a modification to the project AddGUI so that it will do subtraction, multiplication and division of two integre numbers, in addition to addition.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class GUIAddition extends JFrame {
       private String output;
       private int number1, number2, sum;
       private JLabel number1Label, number2Label, sumLabel;
       private JTextField number1TextField, number2TextField;
       private JButton addButton, exitButton;
       private JTextArea textArea;
       public GUIAddition()   {
       super("Sum of Two Integer Numbers");
    // Create an instance of inner class ActionEventHandler
       ActionEventHandler handler = new ActionEventHandler();
    // set up GUI
       Container container = getContentPane();
       container.setLayout( new FlowLayout() );
       // set up Label Fields and Text Fields for number1
       number1Label = new JLabel( "Number1" );
       number1TextField = new JTextField( 10 );
       number1TextField.addActionListener( handler );
       container.add( number1TextField );
       container.add( number1Label );
       // for number2
       number2Label = new JLabel( "Number2" );
       number2TextField = new JTextField( 10 );
       number2TextField.addActionListener( handler );
       container.add( number2TextField );
       container.add( number2Label );
       // for sum
       sumLabel = new JLabel( "Sum" );
       textArea = new JTextArea( 1,10 );  // only output, no addAction
       textArea.setEditable( false );
       container.add( textArea );
       container.add( sumLabel );
       // set up Add Button
       addButton = new JButton( "Add" );
       addButton.addActionListener( handler );
       container.add( addButton );
       // set up Exit Button
       exitButton = new JButton( "Exit" );
       exitButton.addActionListener( handler );
       container.add( exitButton );
      }// end constructor
    // Display The Sum of the Two Numbers in displayfield
       public void displayAddition() {
           textArea.setText(output);
      }// end display method
       public static void main( String args[] )   {
          GUIAddition window = new GUIAddition();
          window.setSize(500, 100);
          window.setVisible( true );
      }// end main
       private class ActionEventHandler implements ActionListener {
         public void actionPerformed(ActionEvent event) {
           // process Text Fields: number1 and number2 as well as Add Button events
           if (event.getSource() == number1TextField)
               number1 = Integer.parseInt(event.getActionCommand());
           else if (event.getSource() == number2TextField)
               number2 = Integer.parseInt(event.getActionCommand());
           else if (event.getSource() == addButton){
                   sum = number1 + number2;
                   output = "" + sum;
                   System.out.println("The Result of adding number1: " + number1 +
                   " and number2: " + number2 + " is: " + sum);
           // process Exit Button event
           else if (event.getSource() == exitButton) System.exit(0);
    // Display Information
           displayAddition();
         } // end method actionPerformed
       }// end inner class ActionEventHandler
    }  // end Class GUIAddition

    I try to do it for subtraction, but it didn't work correctly.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class GUIAddition extends JFrame {
       private String output;
       private int number1, number2, sum, sub;
       private JLabel number1Label, number2Label, sumLabel, subLabel;
       private JTextField number1TextField, number2TextField;
       private JButton addButton, subButton, exitButton;
       private JTextArea textArea;
       public GUIAddition()   {
       super("Sum of Two Integer Numbers");
    // Create an instance of inner class ActionEventHandler
       ActionEventHandler handler = new ActionEventHandler();
    // set up GUI
       Container container = getContentPane();
       container.setLayout( new FlowLayout() );
       // set up Label Fields and Text Fields for number1
       number1Label = new JLabel( "Number1" );
       number1TextField = new JTextField( 10 );
       number1TextField.addActionListener( handler );
       container.add( number1TextField );
       container.add( number1Label );
       // for number2
       number2Label = new JLabel( "Number2" );
       number2TextField = new JTextField( 10 );
       number2TextField.addActionListener( handler );
       container.add( number2TextField );
       container.add( number2Label );
       // for sum
       sumLabel = new JLabel( "Sum" );
       textArea = new JTextArea( 1,10 );  // only output, no addAction
       textArea.setEditable( false );
       container.add( textArea );
       container.add( sumLabel );
       // for sub
       subLabel = new JLabel( "Subtraction" );
       textArea = new JTextArea( 1,10 );  // only output, no addAction
       textArea.setEditable( false );
       container.add( textArea );
       container.add( subLabel );
       // set up Add Button
       addButton = new JButton( "Add" );
       addButton.addActionListener( handler );
       container.add( addButton );
       // set up Sub Button
        subButton = new JButton( "Subtraction" );
       subButton.addActionListener( handler );
       container.add( subButton );
       // set up Exit Button
       exitButton = new JButton( "Exit" );
       exitButton.addActionListener( handler );
       container.add( exitButton );
      }// end constructor
    // Display The Sum of the Two Numbers in displayfield
       public void displayAddition() {
           textArea.setText(output);
      }// end display method
       public static void main( String args[] )   {
          GUIAddition window = new GUIAddition();
          window.setSize(500, 100);
          window.setVisible( true );
      }// end main
       private class ActionEventHandler implements ActionListener {
         public void actionPerformed(ActionEvent event) {
           // process Text Fields: number1 and number2 as well as Add Button events
           if (event.getSource() == number1TextField)
               number1 = Integer.parseInt(event.getActionCommand());
           else if (event.getSource() == number2TextField)
               number2 = Integer.parseInt(event.getActionCommand());
           else if (event.getSource() == addButton){
                   sum = number1 + number2;
                   output = "" + sum;
                   System.out.println("The Result of adding number1: " + number1 +
                   " and number2: " + number2 + " is: " + sum);
           else if (event.getSource() == subButton){
                   sub = number1 - number2;
                   output = "" + sub;
                   System.out.println("The Result of subtraction number1: " + number1 +
                   " and number2: " + number2 + " is: " + sub);
           // process Exit Button event
           else if (event.getSource() == exitButton) System.exit(0);
    // Display Information
           displayAddition();
         } // end method actionPerformed
       }// end inner class ActionEventHandler
    }  // end Class GUIAddition

  • F4 help for GUI

    Hi,
    I need to store a file on the presentation server. For this purpose, I have an icon on the GUI , to download the file from the output screen to the PS.
    I have used the FM 'GUI_DOWNLOAD' for this.
    I need an F4 help, so that when i click on the download icon the menu bar, a popup should come asking for the path on the PS where i want to store the file.
    Can anyone tell me which FM should I call for the popup?

    At the AT SELECTION_SCREEN ON VALUE-REQUEST FOR p_path and code your value help.
      DATA:
        zz_folder   TYPE string.
      CALL METHOD cl_gui_frontend_services=>directory_browse
         CHANGING
           selected_folder = zz_folder
         EXCEPTIONS
           OTHERS          = 0.
    p_path = zz_folder.
    <b>file from application server</b>
    1. F4_DXFILENAME_TOPRECURSION
    This is the FM.
    Reward points,if found useful

  • Need some help with GUI development

    Hi ppl.. I am new to labview and I am currently involved in a testing equipment development. I need some help. firstly I need to know if multi-screen GUI (with icons and stuff)is possible in Labview. Secondly I need to interface the measurements to a database. Would it be possible to create just small executable to perform the measurement part alone and do the rest of database operation using VB. (or would it be advisable to do the whole lot in labview)
    the final sft should look something like this
    screen1 :setup screen... interface with database
    screen2 :actual test and test results
    screen3 :log file creation
    measurement is via daq board and i also need to send some control signals and set up TCP/IP for data transfer.

    Hello.
    I am not completely sure what you mean by "multi-screen", but I am pretty sure that doing the user interface using a tab control will work for you. I have attached an example VI which is a state machine (which in LabVIEW you do with a case structure inside a while loop). Notice how the configuration controls are in the first page of the tab control, associated with state 0 of the state machine, but in the block diagram, they are actually used in state 1 of the state machine. Instead of writing a very long description, I will let you take a look at the code (which I saved in LV 7.0 version). Let me know if you have questions or comments
    Attachments:
    MultiScreenStateMachineExample.vi ‏50 KB

  • Help!  GUI using two buttons

    Hello all:
    I have created a class for reading and writing to a text file on my hard drive. Also, I have created another class for a GUI to use for opening the text file with a button labeled Display. As you will see in the code below, I have created another button labeled Update. I seek to be able to edit and save the text directly in the text area with the Update button after opening the file with the Display button. Any help would be greatly appreciated. Thanks!
    /** Class TextFile */
    import java.io.*;
    public class TextFile
        public String read(String fileIn) throws IOException
            FileReader fr = new FileReader(fileIn);
            BufferedReader br = new BufferedReader(fr);
            String line;
            StringBuffer text = new StringBuffer();
            while((line = br.readLine()) != null)
              text.append(line+'\n');
            return text.toString();
        } //end read()
        public void write(String fileOut, String text, boolean append)
            throws IOException
            File file = new File(fileOut);
            FileWriter fw = new FileWriter(file, append);
            PrintWriter pw = new PrintWriter(fw);
            pw.println(text);
            fw.close();
        } // end write()
    } // end class TextFile
    /** Class TextFileGUI */
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TextFileGUI implements ActionListener
        TextFile tf = new TextFile();
        JTextField filenameField = new JTextField (30);
        JTextArea fileTextArea = new JTextArea (10, 30);
        JButton displayButton = new JButton ("Display");
        JButton updateButton = new JButton ("Update");
        JPanel panel = new JPanel();
        JFrame frame = new JFrame("Text File GUI");
        public TextFileGUI()
            panel.add(new JLabel("Filename"));
            panel.add(filenameField);
            panel.add(fileTextArea);
            fileTextArea.setLineWrap(true);
            panel.add(displayButton);
            displayButton.addActionListener(this);
            panel.add(updateButton);
            updateButton.addActionListener(this);
            frame.setContentPane(panel);
            frame.setSize(400,400);
            frame.setVisible(true);
        } //end TextFileGUI()
        public void actionPerformed(ActionEvent e)
            String t;
            try
                t = tf.read(filenameField.getText());
                fileTextArea.setText(t);
            catch(Exception ex)
                fileTextArea.setText("Exception: "+ex);
            } //end try-catch
        } //end actionPerformed()
    } //end TextFileGUI

    Swing related questions should be posted in the Swing forum.
    You are using the same ActionListener for both buttons, so you need to be able to tell which button was pressed. There are a couple of ways to do this:
    a) use the getSource() method of the ActionEvent and compare the source against your two buttons to see which one was pressed and then invoke the appropriate code.
    Object source = e.getSource();
    if (source == displayButton)
        //  do display processing
    else if (source == updateButton)
        //  do update processingb) Check the action command to determine which button was clicked. This approach is demonstrated in the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]How to Use Buttons
    Another option is to create separate ActionListeners for each button so there is no confusion
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    class TextAreaLoad
         public static void main(String a[])
              final JTextArea edit = new JTextArea(5, 40);
              JButton read = new JButton("Read some.txt");
              read.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        try
                             FileReader reader = new FileReader( "some.txt" );
                             BufferedReader br = new BufferedReader(reader);
                             edit.read( br, null );
                             edit.requestFocus();
                        catch(Exception e2) { System.out.println(e2); }
              JButton write = new JButton("Write some.txt");
              write.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        try
                             FileWriter writer = new FileWriter( "some.txt" );
                             BufferedWriter bw = new BufferedWriter( writer );
                             edit.write( bw );
                             edit.setText("");
                             edit.requestFocus();
                        catch(Exception e2) {}
              JFrame frame = new JFrame("TextArea Load");
              frame.getContentPane().add( new JScrollPane(edit), BorderLayout.NORTH );
              frame.getContentPane().add(read, BorderLayout.WEST);
              frame.getContentPane().add(write, BorderLayout.EAST);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }

  • Help please- GUI calculator

    I am trying to create a GUI calculator which:
    -must use the JOptionPane class to create dialog boxes for user input and
    output.
    -If the user attempts to divide by 0, you must print a message to that effect (e.g.,
    "division by 0 not allowed").
    -If the user enters an invalid operator, you must print a message to that effect
    (e.g., "operation not supported").
    My Program will not work, and any help would be greatly appreciated!
    import javax.swing.JOptionPane;
    public class GUI {
         String numberString =
              JOptionPane.showInputDialog("Welcome to my GUI Calculator!\n The following operations are supported:\n +(addition), -(subtraction), *(multiplication)\n /(division),and ^(exponent)\n\n Enter your calculation separated by spaces and press OK.\n Example:2.5 + 3");
         int firstSpace =
         numberString.indexOf(" ");
         double answer;
         double
         operand1 = Double.parseDouble(numberString.substring(0,firstSpace));
         double
         operand2 = Double.parseDouble(numberString.substring(firstSpace+3,numberString.length()));
         char
         operator = numberString.charAt(firstSpace+1);
         while (operator == "+")
              answer = operand1 + operand2;
         while (operator == "-")
              answer = operand1 - operand2;
         while (operator == "*")
              answer = operand1 * operand2;
         while (operator == "/")
         { if (operand2 == 0)
              JOptionPane.showInputDialog("Division by 0 not allowed!");
              else
              answer = operand1 / operand2;
         while (operator == "^")
              answer = Math.pow(operand1, operand2);
    while (operator != "+, -, *, /, ^")
         JOptionPane.showInputDialog("Operation not supported.");
    JOptionPane.showMessageDialog("numberString = answer");
    System.exit(0);
    }

    When you post code, please wrap it in [code] [/code] tags so it's easy to read.
    You're confusing strings with characters. You read the operator as a character. But when you check it, you compare it with Strings (you can tell they're Strings because you're using double quotes). You should be using single quotes there.
    Your code makes a lot of assumptions about the format of the data it's given, for example the number of spaces and where they'll appear.
    And this part:while (operator != "+, -, *, /, ^") There's absolutely no reason why that would work. Where did you get the idea that was a thing to do? If you want to see if the operator is in a list of characters, there are a variety of things you can do, but probably the simplest is just to have five if/else statements. You're going to need those anyway when you do the math operation; when you get to the last one, just put an else statement saying that you don't recognize the operator.

  • Help with GUI project.

    I need help with JcomboBox when I select the Exit in the File box it will open
    //inner class
    class exitListener implements ActionListener {
    I have the part of the parts of statement but I don't know how to assign the Keystoke. here is that part of the code
    filemenu.setMnemonic(KeyEvent.VK_X);Here is my code...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class MyFrame extends JFrame {
         String[] file = { "New", "Open", "Exit" };//items for file
        String[] edit = { "Cut", "Copy", "Paste" };//items for edit
        JComboBox filemenu = new JComboBox();
        JComboBox editmenu = new JComboBox();
         public MyFrame(String title) {
              super(title);
              this.setSize(250, 250); //sets the size for the frame
              this.setLocation(200, 200);//location where frame is at
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              // setup contents
              makeComponents();
              initComponents();
              buildGUI();
              // display
              this.setVisible(true);
         private void makeComponents() {
              JPanel pane = new JPanel();
    //          file menu section
              filemenu = new JComboBox();
            JLabel fileLabel = new JLabel();
            pane.add(fileLabel);
            for (int i = 0; i < file.length; i++)
                 filemenu.addItem(file);
    pane.add(filemenu);
    add(pane);
    setVisible(true);
    //edit menu section
    editmenu = new JComboBox();
    JLabel editLabel = new JLabel();
    pane.add(editLabel);
    for (int i = 0; i < edit.length; i++)
         editmenu.addItem(edit[i]);
    pane.add(editmenu);
    add(pane);
    setVisible(true);
         private void initComponents() {
              filemenu.addActionListener(new exitListener());
         //inner class
    class exitListener implements ActionListener {
    public void actionPerformed(ActionEvent arg0) {
    int x = JOptionPane.showOptionDialog(MyFrame.this, "Exit Program?",
    "Exit Request", JOptionPane.YES_NO_OPTION,
    JOptionPane.QUESTION_MESSAGE, null, null,
    JOptionPane.NO_OPTION);
    if (x == JOptionPane.YES_OPTION) {
    MyFrame.this.dispose();
         private void buildGUI() {
              Container cont = this.getContentPane();// set gui components into the frame
              this.setLayout(new FlowLayout(FlowLayout.LEFT));// Comp are added to the frame
              cont.add(filemenu);
              cont.add(editmenu);
         // / inner classes
    public class ButtonFrame {
         public static void main(String[] args) {
              MyFrame f1 = new MyFrame("This is my Project for GUI");
    Thanks
    SandyR.

    One way is to
    1) pass a reference of the Window object to the USDListener class, and set a local Window variable say call it window, to this reference.
    2) Give the Window class a public method that returns a String and allows you to get the text from USDField. Same to allow you to set text on the euroField.
    3) Give the Listener class a Converter object.

  • Need Help creating Icon overlays for my SVN Client

    Hi I am currently writing an cross platform SVN client. I have icon overlay working in windows and linux. This is a small image that sits on top of the normal icon in finder and represents the current state of the file, e.i out of sync, up to date, un-versioned. But am really struggling trying to get it to work in OSX. At this point I only want it to work in snow leopard. This is where I have got to so far.
    I managed to create a QL plugin that worked. The only issue with QL plugins is that you have to specify what file types your plugin works for, (my sample worked for gifs). Unfortunately I don't know that as it needs to work for every file and folder on the system that contains a subfolder called .svn. So with a week of reading I have come to the decision that the only real way around this is to override the QLThumbnailImageCreate function that finder calls and replace it with my own if I find a .svn or call the original if not. However if this is the only route I have not been able to get any code to work that will replace the function with my own.
    If any one can show me an example of switching that function, or has an alternative solution. Or knows the LSItemContentTypes type that means my plugin will fire for every single file, then I would be very happy. I've spent no more than 2 days getting this to work on windows and linux, but I've spent soooo many hours on OSX. Any help would be great.

    DanUK wrote:
    Thanks for your reply etresoft. I know it definitely is possible because the application dropbox does it.
    I'm not so sure. People working on the SC Plugin SVN program have been trying to do that for years. I don't know if they have ever gotten it to work.
    But unfortunately its not open source so I can find out how they did it. The only other way I can do it is to monitor file system changes and then set a custom icon. But this has many draw backs. such as custom icons are persistant and will remain even when my software has been uninstalled.
    I think you should really look into using labels. An SVN/CVS user probably isn't going to be using icon view anyway. Labels will be far more useful in real life. Custom icons are just a gimmick.
    I using QT Creator to write the software so if you fancy a go I can share the project with you.
    Perhaps we should stick to our respective SCM programs. I'm not a fan of QT either

  • HELP! Gradient overlay not working. Gradient Overlay has stopped working! Why?

    Hi
    First off if i apologise if i am in the wrong place/not posting correctly etc. It's my first time posting in this forum. I am havign an issue at work. I have always used the layer style - gradient overlay to make my 'buttons' for e-shots/newsletters. But yesterday it just stopped working. Below is a screen shot to try demonstrate clearly what I mean -
    As you can see, the button on the composition should have a gradiant of orange and blue (not the actual colours im using - was just a gradual red -? dark red - but for clarity in the image i picked this default gradient).
    I've tried resetting to default, i've looked at an old photoshop folder with a gradient overlay and made sure alll the setting are the same. I've tried making the actual button object different sizes but nothing works. (When i make it larger, it does eventually show the blue, but as soon as i *apply*, it goes to flat orange again)
    Anyone have any help atall please? Like i said it's been doing this since yesterday - This is a very basic thing that I need to be able to do for my job - flat colours for a button look rubbish!
    Oh i'm using photoshop cs5 on a mac incase thats important
    Thanks in advance
    edit: i uninstalled photoshop cs5 and reinstalled it and it didnt change anything.

    Do you have Align with Layer checked?
    Or move the gradient on the image while the layer styles dialog is open (probably moving it up) , as maybe the adjustment is such that only the orange is showing.
    Does it make a difference if you view the image at actual pixels (100% view)?
    If all else fails i'd reset the photoshop preferences and see if that gets things back to normal:
    http://forums.adobe.com/thread/375776?tstart=0

  • Help whit GUI and code separeted files !

    Hi.. i have a problem...
    i wanna have two classes one that has the code.. and the other that as the GUI formating... so they have to comunicate..
    Example :
    Code Class
    public class EFClient   
        EFClientGUI gui;
        public EFClient(){ 
        public void dosomething(){
             gui = new EFClientGUI ();
             gui.Label1.getText(); ---> i get a nullpointexception here
    }GUI CLASS :
    public class EFClientGUI extends javax.swing.JFrame {
        public EFClient efClient;
        public EFClientGUI(String teste){      
            efClient=new EFClient();---> this will call the "code"
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
         try{
            efClient.dologin("Duarte","Rui");---- calls code class
         }catch(Exception ex){
             System.out.println(ex);
    }here a littel explanation :
    I run EFClientGUI ..... it calls EFClient... and designs.... tem i click the button and i trie to do the login.... the te login writes something to GUI...
    can someone help ?

    problem solved

  • Urgent- Please help with image overlaying

    Hi,
    Please,please, can someone help me with an imaging issue and show me what I'm doing wrong.
    I'm a swing beginner and I'm trying to create a application for a board game. Currently I'm using JLabel components to try and create jpeg pieces over a JPanel component that has the board background.
    Currently I've written the code for the board background component and the pieces but can't get the image to appear on the background.
    Please can someone show me what I'm doing wrong.
    If someone can help me get this working, I've got 16 dollars from other posts in this forum I can give you.
    Thanks.
    public class BoardPanel extends JPanel {
    public BoardPanel()
    //Overwrite abstract painting method
    public void paintComponent(Graphics g)
    super.paintComponent(g);
              g.drawImage(backgroundImage,0,0,this.getWidth(), this.getHeight(), null);
    private Image backgroundImage = new ImageIcon("./Board.gif").getImage();
    public class PieceIcon extends JLabel {
    public PieceIcon(String symbol)
    System.out.println("./"+symbol+".jpg");
              pieceImage = new ImageIcon("./"+symbol+".jpg");
    public void paintComponent(Graphics g)
              super.paintComponent(g);
              g.drawImage(pieceImage,playerBoardPos.getX(),playerBoardPos.getY(), this);
    private Image pieceImage;
    Main:
    JPanel content = new JPanel();
    PieceIcon testPiece = new PieceIcon("Dog");
    BoardPanel boardIcon = new BoardPanel();
    getContentPane().add(content, java.awt.BorderLayout.CENTER);
    content.add(boardIcon, java.awt.BorderLayout.CENTER);
    boardIcon.setLayout(new javax.swing.OverlayLayout(boardIcon));
    boardIcon.add(testPiece);

    Oh, and since you probably won't be needing a layout manager, try the following:
    setLayout(null);
    ChessPeice peice1 = new ChessPeice(...);
    add(peice1);
    peice1.setBounds(x, y, width, height);also, your ChessPeice paintComponent method should look more like:
    ... //in constructor
    setPreferredSize(new Dimension(image.width, image.height));
    setOpaque(false);
    public void paintComponent(Graphics g){
       g.drawImage(...);
    }Make sure that if you call the component's getSize method to determine the width and height you do it after pack has been called. If you call getSize before then, it will return 0 for the width and height values.
    Another advantage to this approach is that the peices only draw in the areas they need to.
    Hope this helps.

Maybe you are looking for

  • Can i put two ipods on one itunes

    can i put two ipods on one itunes

  • How to perform LOV auto completion

    Hi, I want to be able to leave the LOV text box empty and press tab to the LOV flashlight and the all the values corresponding to the LOV should appear automatically. I have set Disable Validation --> False and Selective Search Criteria --> False. So

  • Can't update my iPhone 3GS

    My iPhone 3GS is version 4.2.1 when I try to update it to the newest version it says the device isn't eligible for the requested version. It has never been jailbroken. I am afraid to restore it because it can pop up the same error and I won't be able

  • SAP Note 1413253 - Eletronic Duplicate Invoice Functionality for Argentina

    Hi All The last step of the  SAP Note 1413253 - Eletronic Duplicate Invoice Functionality for Argentina is to create V_1AOUM view, using transaction SE54, but I am getting the error message: "Incorrect Entry"  - the object is not accepting the access

  • Production Premium CS6 Reinstall

    Hello, I am about to reinstall my Adobe Production Premium CS6 suite due to failing hardware corrupting the dynamic link server. I have already done this once, but my question this time is: Will the key code return used when I try to install it? Do I