Linking a Java class to a Swing GUI...

Well I've got a class for running a text based interface for a simple queue system. All I need to do is link it to the GUI i have designed. Below is the code for both. Anyone that can give me code to link the classes between them (I'm going to change the uuInOut statements to .getText() where relevant).
Thanks for the help. My bloodpressure and stress levels need it.
import uuInOut;
class Queue
     QueueNode start;
     QueueNode end;
     public int totalSize = 0;
     public int choice;
     public String yesNo;
     public Queue()
                    start = new QueueNode();
                    start = null;
                    end = new QueueNode();
                    end = null;
     public void add()
          if (start==null)
               start = new QueueNode();
               System.out.print("\nPlease enter your username: ");
               start.owner = uuInOut.ReadString();
               System.out.print("\nPlease enter the name of the document:");
               start.name = uuInOut.ReadString();
               System.out.print("\nPlease enter the size of the document(in kilbytes):");
               start.size = uuInOut.ReadInt();     
               totalSize = totalSize + start.size;
               start.next = null;
               start.previous = null;
               end = start;
          else
               QueueNode temp = new QueueNode();
               System.out.print("\nPlease enter your username: ");
               temp.owner = uuInOut.ReadString();
               System.out.print("\nPlease enter the name of the document:");
               temp.name = uuInOut.ReadString();
               System.out.print("\nPlease enter the size of the document(in kilobytes):");
               temp.size = uuInOut.ReadInt();     
               totalSize = totalSize + temp.size;
               temp.next = end;
               end.previous = temp;
               end = temp;
     public boolean isEmpty()
          return (start==null);
     public void remove()
          String name2;
          QueueNode before = new QueueNode();
          QueueNode after = new QueueNode();
          QueueNode temp = new QueueNode();
          if (this.isEmpty())
                    System.out.println("Error there are no documents in the queue.");
               else
                    do
                         System.out.println("Which document do you wish to remove: ");
                         name2 = uuInOut.ReadString();
                         while(temp.name!=name2)
                              before = temp.previous;
                              after = temp.next;
                              temp.next = after;
                              temp.previous = before;
                              temp = before;
                              System.out.println("\nThe document has been removed");
                    System.out.print("\nDo you wish to remove another document: ");
                    yesNo = uuInOut.ReadString();
                    }while(this.yesNo.equalsIgnoreCase("y"));
     public void displayAll()
          if (this.isEmpty())
               System.out.println("\nThere are no documents to display.");
          else
               System.out.println("User\t\tDoc Name\t\tSize\n");
               QueueNode temp = new QueueNode();
               temp = start;
               while (temp!=null)
                    System.out.println(temp.owner+"\t\t"+temp.name+"\t\t\t"+temp.size);
                    temp = temp.previous;          
     public int getSize()
          return totalSize;
     public void purge()
          if (this.isEmpty())
               System.out.println("\nThere are no documents in the queue.");
          else
               start = new QueueNode();
               start = null;
               end = new QueueNode();
               end = null;
               totalSize = 0;
               System.out.println("The queue is now empty.");
     public void displayMenu()
          System.out.println("\n\t\tMain Menu");
          System.out.println("\n\t1.\tAdd a document to the Queue");
          System.out.println("\t2.\tRemove a document from the Queue");
          System.out.println("\t3.\tDisplay all documents in the Queue");
          System.out.println("\t4.\tDisplay the total size of the Queue");
          System.out.println("\t5.\tPrint a document");
          System.out.println("\t6.\tPurge all documents from the Queue");
          System.out.println("\n\t8.\tExit Program");
          System.out.flush();
     public void print(String name2)
          if(this.isEmpty())
               System.out.println("\nThere are no documents to print.");
          else
               System.out.println("Printed");
Here's the code for the GUI (there seems to be a problem with it which I cant seem to figure out)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import Queue.*;
import QueueNode;
public class PrinterQueueInterface extends JFrame implements ActionListener
     JLabel nameLabel, userLabel, sizeLabel, numberLabel, totalLabel;
     JTextField nameBox, userBox, sizeBox, numberBox, totalBox;
     JButton addButton, removeButton, printButton, purgeButton, exitButton;
     public PrinterQueueInterface()
          super("Queue System");
          setSize(350,360);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          nameLabel = new JLabel("Name:");
          userLabel = new JLabel("User:");
          sizeLabel = new JLabel("Size:");
          numberLabel = new JLabel("No. Of Items in Queue:");
          totalLabel = new JLabel("Total Size of the Queue:");
          nameBox = new JTextField(15);
          userBox = new JTextField(15);
          sizeBox = new JTextField(5);
          numberBox = new JTextField(3);
          totalBox = new JTextField(15);
          addButton = new JButton("Add Document");
          removeButton = new JButton("Remove Document");
          printButton = new JButton("Print Document");
          purgeButton = new JButton("Purge the Queue");
          exitButton = new JButton("Exit");
          JPanel pane = new JPanel();
          setContentPane(pane);
          show();
          Container contentPane = getContentPane();
          contentPane.setLayout(new GridLayout(0,2));
          setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
          contentPane.add(nameLabel);
          contentPane.add(nameBox);          
          contentPane.add(userLabel);
          contentPane.add(userBox);
          contentPane.add(sizeLabel);
          contentPane.add(sizeBox);
          contentPane.add(numberLabel);
          contentPane.add(numberBox);
          contentPane.add(totalLabel);
          contentPane.add(totalBox);
          setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
          contentPane.add(addButton);
          contentPane.add(removeButton);
          contentPane.add(printButton);
          contentPane.add(purgeButton);
          contentPane.add(exitButton);
          addButton.setLocation(50,100);
          removeButton.setLocation(10, 100);
          printButton.setLocation(20,100);
          purgeButton.setLocation(30,100);
          exitButton.setLocation(40,100);
          addButton.addActionListener(this);
          removeButton.addActionListener(this);
          printButton.addActionListener(this);
          purgeButton.addActionListener(this);
          exitButton.addActionListener(this);
          public void actionPerformed(ActionEvent evt)
               Object source = evt.getSource();
               if (source==exitButton)
                    System.exit(0);
               else if (source==clearButton)
                    nameBox.setText("");
                    userBox.setText("");
               else
                    public String docName = nameBox.getText();
                    public String userName = userBox.getText();
                    public String docSize = sizeBox.getText.toInt();
                    if (source==addButton)
                         Queue.add(docName, userName, docSize);
                    else if (source==removeButton)
                         Queue.remove(docName, userName, docSize);
                    else if (source==printButton)
                         Queue.print();
                    else if (source==purgeButton)
                         Queue.purge();
          public void main(String[] args)
               new PrinterQueueInterface();
}

It is simple and very annoying.
I think you should try to do it yourself to learn how Java works, it is a good exercise for you.
The forum is used to work together on different problems, giving tips and ideas but not coding for other people.
About your problem, two things : you should rewrite all the code (not trying to link these two classes) and you will have serious problems wityh the different setLayout you use !
Denis

Similar Messages

  • Running a Java application from a Swing GUI

    Hi,
    I was wondering if there is a simple way to run a Java application from a GUI built with Swing. I would presume there would be, because the Swing GUI is a Java application itself, technically.
    So, I want a user to click a button on my GUI, and then have another Java application, which is in the same package with the same classpaths and stuff, run.
    Is there a simple way to do this? Do any tutorials exist on this? If someone could give me any advice, or even a simple "yes this is possible, and it is simple" or "this is possible, but difficult" or "no this is not possible" answer, I would appreciate it. If anyone needs more information, I'll be happy to provide it.
    Thanks,
    Dan

    I don't know if it is possible to run the main method from another Java app by simply calling it...
    But you could just copy and paste the stuff from your main method into a new static method called something like runDBQuery and have all the execution run from there.
    How does that sound? Is it possible?
    What I'm suggeting is:
    Original
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void main(String[] args){
    // Your method calls
    //Your initializing
    doQuery();
    }Revised:
    public class DBQuery{
    public static void methodA(){
    public static void doQuery(){
    methodA();
    public static void doMyQuery(){
    // Your method calls
    //Your initializing
    doQuery();
    // No main needed!!
    //public static void main(String[] args){
    // Your method calls
    //doQuery();
    //}

  • Having problems linking two java classes getting a "deprecated API" error??

    Hi,
    I am tryin to link one page to another in my program, however i get the followin msg:-
    Project\alphaSound.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    Process completed.
    this only happens when i add the bold piece of code to the class; even though the italic piece of code does take you to a new page?:-
    public class alphaSound extends JPanel implements ActionListener
    {static JFrame f = new JFrame("AlphaSound");
    public alphaSound() {
    public void actionPerformed(ActionEvent event) {
                 Object source = event.getSource();
    else if(source == vowel)
    { Vowelm vm = new Vowelm();
    vm.setSize(Toolkit.getDefaultToolkit().getScreenSize());
    vm.show();
    f.dispose();
    else if(source == back)
    { MainPage main = new MainPage();
    main.setSize(400,300);
    main.show();
    f.dispose();}
    public static void main(String s[]) {
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
            //JFrame f = new JFrame("AlphaSound");
            f.addWindowListener(l);
            f.getContentPane().add(new alphaSound());
            f.setSize(Toolkit.getDefaultToolkit().getScreenSize()); 
            f.show();
    }here is the class its tryin to call
    public class Vowelm extends JPanel implements ActionListener
    {static JFrame v = new JFrame("VowelSound");
       public Vowelm() {
                                                   ..etc...
    public static void main(String s[]) {
            WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {System.exit(0);}
            //JFrame f = new JFrame("VowelSound");
            v.addWindowListener(l);
            v.getContentPane().add(new VowelmSound());
            v.setSize(Toolkit.getDefaultToolkit().getScreenSize()); 
            v.show();
    }Im pretty sure ther is some conflict between the two classes due to the way they are called and designed?
    Hope you can help!
    Kind Regards
    Raj

    You may want to check your show() calls and see if
    they can be replaced with setVisible(). Forexample,
    in your Vowelm code, you have a static JFrame v.
    At
    the end of your main function, you use v.show().As
    of JDK1.1, this has been deprecated in favour of
    setVisible(boolean).hey show() in JFrame is from Window and in windowits
    not deprecated ..
    show is not decrecated thats for sure ... i dontknow
    y you said that ...
    you can look in docs as well..
    True - but this in turn overrides show() from
    java.awt.Component, which has been deprecated. My
    guess is that's where the problem comes from.
    Thanks for the Dukes!
    FlicAnd then again - perhaps not. After looking into this a bit more, I take back my last comment about the Component override. However, as I said in my original reply, compiling with -deprecation should tell you which show() call is flagging the error. There is definitely one somewhere that the JVM doesn't like - without seeing your complete code, it's hard to say exactly where. Based on what you've posted, my guess is that it is within the Vowelm class.
    Next time, I'll try to avoid 'shooting from the hip'.
    Again, thanks for the Dukes,
    Flic

  • NetBean - java class add to JFrame form?

    i have already type my own class using 'java class type' . The problem is, now i wanted to add a new class using the GUI in netbeans, so i create a JFrame using GUI in netbean, how do i connect the 'java class type' with the 'JFrame Form type' in netbean?
    I'll be able to call a frame to another frame if i using both JFrame form type. The problem came in when i try to link the java class i just mention above. Please help.

    karhong,
    Sorry mate, your question is impossible to interpret. Try asking your question again in different words... and include your code, and error any message(s)...
    ... and read the Formatting tips before you post.
    ... and this is a Java coding forum... so you might have better luck posting this one on a netbeans specific forum like JGuru's Netbeans Forum.

  • 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.

  • How to run Java Swing GUI on embedded ARM Linux platform?

    The object is:
    A touch panel, running Java Swing GUI, with a 25 fps 320x320 mono JPEG image animation and other control buttons.
    What I have now:
    A Developing Board with: ARM926 CPU at 266MHz, 128M RAM, 64M ROM, ported with arm-linux and MiniGUI.
    My plan is:
    1. installing a X-window system to the platform, discarding the MiniGUI.
    2. install j2re-1.3.1-RC1-linux-arm.tar.bz2 to the platform.
    3. run my program developed on a PC.
    My concerns are:
    1. Both X and Java is resource consuming, can a 266MHz ARM CPU meet my requirement?
    2. Is the X a must to run Java Swing GUI? If yes, how can I configure it to minimize the footprint, I mean, install only necessary modules.
    3. Can J2RE 1.3.1, the only port for arm linux, support Swing classes?
    4. Are there other options, such as CDC + PP(AGUI?), how to do it?
    Thanks alot!

    3. Can J2RE 1.3.1, the only port for arm linux, support Swing classes?I'm not entirely sure from your post: is this a J2SE port? If so it will support Swing, but probably needs Qt.

  • JavaDoc HTML link of  classes in Java class diagram not correct

    Hi,
    I created a Java class diagram in a certain package (e.g. com.mycompany.p1) and placed some classes on this diagram from the same package and from other packages. Then I created JavaDocs. When I click on the classes in the created JavaDoc diagram, only the links of the classes in the same package as the diagram (com.mycompany.p1) wor correctly. When I click on a class outside this package I get an error message that the file is not found. It looks for the class documentation in the package of the diagram and this is obviousely wrong!
    Is there a property I missed to set or is it a bug?
    Thanks for help
    Thomas

    Hi Thomas,
    I don't use the diagrammers much, so I cannot comment on this directly; however, based on your description, it does sound like a defect. Do you have access to Oracle Support to file an SR?
    John

  • 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]));//> }

  • Link java class with custom taglib in Nitrox

    Hi,
    I am creating a set of Nitrox custom libraries for my company, and I need a tag with the following behavior:
    The tag insert window has to contain a select combo with information retrieved from a file or a database.
    So, my questions are:
    1) How can I call java classes from tlei or tagedit files?
    2) What does it mean the following tag?
    <editor-class>com.m7.wide.struts.tags.tagedit.StrutsSelectTagEditor</editor-class>
    3) What does it mean this other tag?
    <default-bundle>com.m7.wide.struts.resources.html-resources</default-bundle>
    4) Do you have any online documentation about tagedit files and the related classes?
    I am using Eclipse 3.1 and Nitrox 3.0.0 M2
    Thanks in advance,
    Alberto

    The Workshop Java API for tag customization is not public for the time being, sorry for the inconvenience.

  • (Youtube-) Video in a Swing GUI

    Hey everyone,
    I'm currently trying to play a video in my Swing GUI with JMF but I really can't get it to work.
    With the help of google I got this far:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.media.CannotRealizeException;
    import javax.media.Manager;
    import javax.media.NoPlayerException;
    import javax.media.Player;
    import javax.swing.JFrame;
    public class MediaPanel extends JFrame {
        public MediaPanel() {
            setLayout(new BorderLayout()); // use a BorderLayout
            // Use lightweight components for Swing compatibility
            Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, true);
            URL mediaURL = null;
            try {
                mediaURL = new URL("http://www.youtube.com/watch?v=Q7_Z_mQUBa8");
            } catch (MalformedURLException ex) {
                System.err.println(ex);
            try {
                // create a player to play the media specified in the URL
                Player mediaPlayer = Manager.createRealizedPlayer(mediaURL);
                // get the components for the video and the playback controls
                Component video = mediaPlayer.getVisualComponent();
                Component controls = mediaPlayer.getControlPanelComponent();
                if (video != null) {
                    add(video, BorderLayout.CENTER); // add video component
                if (controls != null) {
                    add(controls, BorderLayout.SOUTH); // add controls
                mediaPlayer.start(); // start playing the media clip
            } // end try
            catch (NoPlayerException noPlayerException) {
                System.err.println("No media player found");
            } // end catch
            catch (CannotRealizeException cannotRealizeException) {
                System.err.println("Could not realize media player");
            } // end catch
            catch (IOException iOException) {
                System.err.println("Error reading from the source");
            } // end catch
        } // end MediaPanel constructor
    }But all I get is errors:
    Warning: The URL may not exist. Please check URL
    No media player found
    Can you please please help me get this working? I would really appreciate a little walkthrough
    Best regards,
    Patrick
    Edited by: 954807 on Aug 24, 2012 6:52 AM

    Just use \ tags. People don't like to go to external sites.
    I really advise you to consider using JavaFX 2 here. Swing is old and not really supported anymore, JMF is also old and absolutely not supported anymore.                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Simple java class for SQL like table?

    Dear Experts,
    I'm hoping that the java people here at the Oracle forums will be able to help me.
    I've worked with Oracle and SQL since the 90s.
    Lately, I'm learning java and doing a little project in my spare time. 
    It's stand alone on the desktop.
    The program does not connect to any database 
    (and a database is not an option).
    Currently, I'm working on a module for AI and decision making.
    I like the idea of a table in memory.
    Table/data structure with Row and columns.
    And the functionality of:
    Select, insert, update, delete.
    I've been looking at the AbstractTableModel.
    Some of the best examples I've found online (they actually compile and work) are:
    http://www.java2s.com/Code/Java/Swing-JFC/extendsAbstractTableModeltocreatecustommodel.htm
    http://tutiez.com/simple-jtable-example-using-abstracttablemodel.html
    Although they are rather confusing.
    In all the examples I find, there always seems to be
    at least three layers of objects:
    Data object (full of get/set methods)
    AbstractTableModel
    GUI (JFrame, JTable) (GUI aspect I don't need or want)
    In all the cases I've seen online, I have yet to see an example
    that has the equivalent of Delete or Insert.
    Just like in SQL, I want to define a table with columns.
    Insert some rows. Update. Select. Delete.
    Question:
    Is there a better java class to work with?
    Better, in terms of simpler.
    And, being able to do all the basic SQL like functions.
    Thanks a lot!

    Hi Timo,
    Thanks. yes I had gone thru the java doc already and  they have mentioned to use java.sql.Struct, but the code which got generated calls constructor of oracle.jpub.runtime.MutableStruct where it expects oracle.sql.STRUCT and not the java.sql.STRUCT and no other constructor available to call the new implementation and that is the reason i sought for some clues.
      protected ORAData create(CmnAxnRecT o, Datum d, int sqlType) throws SQLException
        if (d == null) return null;
        if (o == null) o = new CmnAxnRecT();
        o._struct = new MutableStruct((STRUCT) d, _sqlType, _factory);
        return o;
    here CmnAxnRecT is the class name of the generated java class for sqlType.
    Thanks again. Please let me know if you have any more clues.
    Regards,
    Vinothgan AS

  • Implemetaion of Java Class in Forms10g [ Francois Degrelle's Techniques]

    Hi,
    I have found one java class on web, which can be more suitable for my application than what I am using now i.e., Client_Get_file_name [webutil].
    I feel myself to replace Client_Get_file_name [webutil] with the following class.. but unfortunately I am not well versed with Java to customize this class so that it run in forms. [ [b]This java file executing good at Command prompt ]
    ================= FileChooser12.java ===============
    import java.io.File;
    import javax.swing.*;
    public class FileChooser12 {
    public static void main(String args[]) {
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    JFileChooser fileChooser =
    new JFileChooser(".");
    int status = fileChooser.showOpenDialog(null);
    if (status == JFileChooser.APPROVE_OPTION) {
    File selectedFile =
    fileChooser.getSelectedFile();
    System.out.println("Selected: "
    + selectedFile.getParent()
    + " --- "
    + selectedFile.getName());
    System.exit(0);
    ========================= =======================
    Could anybody plz help me out to implement this class in forms10g with Java beans
    I suceeded in implementing demo given in Francois Degrelle's Techniques link
    http://fdegrelle.over-blog.com/50-categorie-265996.html , but User wants to choose file with key press .. for exaple If user press letter 'S' in file list area , it should take to the file where its starts with 'S' , just like windows nativity. This is giving by the above class.
    Hi Francois Degrelle..
    I would like say thanks to you , as I am implementing java beans in my application by the help of article in your home site.
    Please post some solution to my problem if Possible , I am in the Hope that Everything is Possible.
    Thanks
    DJ
    Thanks

    Hi Francois,
    Thanks for your quick response ,
    I would like to ask you that can we do some modifications in your GetImageFileName.java such that we can able to get the required feature.[File selection thru key press in Files List ]
    Thanks.
    DJ

  • Swing GUI Features of JSP????

    Hi,
    I have done some reading on JSP but before I delve into practice, I have got a few questions to ask about the GUI features if I use JSP.
    01. In order to make the JSP webpages (using HTML, not XML) more interactive and appealing, can I embed swing components into JSP?
    02. I think I can combine applet and JSP together (actually can I???? But they reside in different directories on the webserver?????)
    03. The other thing is: how can the applet and JSP programs talk to each other (pass variables)?????
    If JSP cannot have the GUI functionalities of swing or applet or even Microsoft ActiveX, it would make it less appealing to me. I'd rather go back to my Perl/CGI except Java is OO, portable, JDBC is database independent, can be multi-tier etc, etc.... JAVA still has a lot of advantages.....

    Hi,
    In order to make the JSP webpages (using HTML,
    not XML) more interactive and appealing, can I embed
    swing components into JSP?
    think I can combine applet and JSP together
    (actually can I???? But they reside in different
    directories on the webserver?????)Yeah.You can combine Applet and JSP together.For that JSP
    provides a tag called <jsp:plugin> which executes an applet
    or bean and, if necessary, downloads a Java plug-in to execute
    it.
    To specify where Applet is located, <jsp:plugin> contains an
    attribute called codebase to specify where the directory (or path to the directory) that contains the Java class file the plug-in will execute. If you do not supply a value, the path of the JSP file that calls <jsp:plugin> is used.
    how can the applet and JSP programs talk to each other (pass variables)?Please go through our technote on ": Communicating with a servlet or JavaServer[tm] Page (JSP[tm]) through a Java[tm] application" in our website at http://access1.sun.com/technotes/01220.html
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • WebService DataControls programmatically construct java class en jdeveloper 11g

    1. I have a data control what is a web service client to URL https:
    2. JDev 11g build a model
    3. I need to call this data control from java class
    4. My java class simply must call a method of the web service, this method I see in the DAta Control, with the parameter and just return the String,
    5. this is not a Web Application, is swing, I not have a Context
    method in WS
    public String ConsultaPlaca(String arg1);
    How I can implement this?
    Just in Java Class, not in page JSP. the java class is a library of other Java class, I need to build a file .jar

    Hi Vishal,
    I created the class as mentioned in the link. But when I try to test the web service, I get the following error :
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "oracle.apps.ddr.testFileDownload" failed to preload on startup in Web application: "Application7-Project1-context-root".
    javax.xml.ws.WebServiceException: Annotation @com.sun.xml.internal.ws.developer.StreamingAttachment(parseEagerly=true, dir=, memoryThreshold=40000) is not recognizable, atleast one constructor of class com.sun.xml.internal.ws.developer.StreamingAttachmentFeature should be marked with @FeatureConstructor
         at com.sun.xml.ws.binding.WebServiceFeatureList.getWebServiceFeatureBean(WebServiceFeatureList.java:176)
         at com.sun.xml.ws.binding.WebServiceFeatureList.parseAnnotations(WebServiceFeatureList.java:148)
         at com.sun.xml.ws.binding.WebServiceFeatureList.<init>(WebServiceFeatureList.java:113)
    Any ideas on how I can make it work ?
    Thanks and Regards,
    Pritom

  • Need to run swing GUIs under different JRE versions

    I need to run swing GUIs under different JRE versions. Where can I find information about how to use only classes which exist from version 1.1.7 and above?

    Under 1.1.7, Swing (then version 1.0) was under com.sun.java.swing. The package name changed in Swing 1.1 b3/JDK 1.2 to javax.swing. You can see what classes were available under Swing 1.0 at http://java.sun.com/products/jfc/swingdoc-api-1.0.3/frame.html

Maybe you are looking for

  • Ipod only sgows the logo and is not being read by computer

    i recently put song onto my ipod but now when i turn it on it shows a black screen and the ipod logo only. it does not change from that. what do i do?

  • How to restore your old music after it has been erased from being synced??

    I once had music on my iphone and i synced it on my laptop wth itunes and now everything has been erased!!! How do I get everything back. I tried adding the music again but nothing it working. i EVEN checked my history of songs played on itunes and h

  • How to know the tables used in an Extractor?

    Hi Friends, Is there any method to find out the underlying tables used in an extractor? For example , 2LIS_11_VAITEM datasource uses tables  VBAP and VBUP( item status). For LOs we can see it in Lo **** pit. So If any extractor uses more than one tab

  • OO4 character Display Problem

    Hi All, I am using Oracle OLE objects to connect to Oracle 9.2 DB The NLS Language for the Database is AMERICAN_AMERICA.AR8ISO8859P6 the client is using also the same NLS. When I retrive the information using OO4 some varchar2(Arabic Language) are re

  • Simple web service authentication question

    I'm using the application server included with Sun ONE Identity Server 6.1 (and Apache Axis) to deploy a very simple sample web service. Accessing it from a web browser works fine. (After entering the url to my service, I'm redirected to the authenti