Linking output to gui

Im trying to link the output text terminals contents to be displayed within the gui, is using a JtextArea the correct way to do this, and also is there a shortcut such as copying the contents straight into the gui window? ive checked the APi but have either overlooked or cant find an item to do this.
thanks!

If I understand you, there is no shot cut to using setText or append. One
handy method that is often overlooked is
read(Reader , Object )
Which would help copy from a file, but not from the console, unless stdin is
being redirected from a file :-)

Similar Messages

  • How to link output page to output excel sheet?

    Hi,
    I have written a program where the output is downloaded as an excel sheet.There are 2 option in the output
    either we can display the output in the form of a ALV or we can download it into an excel sheet.
    Now,I want to know how I can link that excel sheet to the ALV display output,which should finally display
    the alv as the first page and the downloaded sheet as the next page.
    Regards,
    swain19

    Hi,
       You can link output type to your zprogram through NACE transaction.
    There you need to select the 'Application' and click on the 'Output types' push button.
    for ex:
      go to txn NACE and choose V3(Billing) then it will take you to the next screen there you can provide
    your ZOutput type or choose a existing one and double click on it.
    Now it will take you to the output type, there you will find 'Processing routines'.
    In processing routines you can link your program to corresponding medium of processing like Fax or Print output.
    If you want anymore help, you can always get back to me.
    Regards,
    Jalendhar

  • Adding link on SAP Gui logon page

    Hi All,
    I have the problem that I need to add a link on the SAP Gui logon page.
    Within the transaction SE61 I have added the general text ZLOGIN_SCREEN_INFO.
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Does anybody have an idear?
    Thank you for your help
    Soeren

    Hi Juan,
    When I click on the Insert Command I have the possibility to create a link but the char. format F4 list is empty and it does not accept the link creation without it being filled.
    Would you please comment on this ?
    I have also seen the only possibility... but same issue...
    Regards.
    Rajesh Narkhede

  • Link in a GUI

    Greetings,
    I wish to add a link to my JAVA application program GUI. i.e. i will add a label representing my email address, so when a person clicks it, it automatically opens the computers email program eg. Outlook express with the email address placed in the To box.
    Like a hyper link. How can I make a link to a website that way too?
    Thank you,
    RamboTango

    Round your text string of JLabel <HTML>...</HTML>.
    For example:
    label = new JLabel("<HTML><B>Your Text</B>on label:</HTML>");
    You my use close tags </B> or </HTML> or not use - as you wish.

  • Link javabean to GUI

    How can I link the buttons in the GUI to a javabean, please give example!

    You just need to have your bean instanciated and visible in the same scope as where you want to use it in your GUI.

  • Array output to GUI

    I need to write a gui that takes data from an array and puts it in a gui frame. Nothing fancy, no buttons, just a frame with all the data in there. A close button wouldnt be a bad idea but its not needed.
    The program currently displays the information I want just fine but does it in console. I just want to tell that data to use a gui instead of console.
    Can anyone give me a hint on where to begin? I havent used swing or created a gui before this and I am new to java entirely.

    Hmm, that gives me an idea where to start but I think my case is a bit more sophisticated then that. Here is the code.
    //  Jmichelsen
    //  Created June 17, 2007
    /*  This program is designed to show an inventory of CD's in alphabetical order
        and their corresponding prices.
        It gives the prices of the CD's and the value of the entire inventory.
        It adds a restocking fee for the entire product inventory and displays it separately */
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Inventory4 {
        public static void main(String[] args) {
            CD cd;
            Inventory inventory = new Inventory();
            cd = new CDWithGenre(16, "Snatch Soundtrack", 11, 13.01f, "Soundtrack");
            inventory.add(cd);
            cd = new CDWithGenre(12, "Best Of The Beatles", 10, 19.99f, "Classic Rock");
            inventory.add(cd);
            cd = new CDWithGenre(45, "Garth Brooks", 18, 10.87f, "Country");
            inventory.add(cd);
            cd = new CDWithGenre(32, "American Idol", 62, 25.76f, "Alternative");
            inventory.add(cd);
            cd = new CDWithGenre(18, "Photoshop", 27, 99.27f, "None");
            inventory.add(cd);
            inventory.display();    
        } //End main method
    } //End Inventory4 class
         /* Defines data from main as CD data and formats it. Calculates value of a title multiplied by its stock.
          Creates compareTo method to be used by Arrays.sort when sorting in alphabetical order. */
    class CD implements Comparable{
        //Declares the variables as protected so only this class and subclasses can act on them
        protected int cdSku;        
        protected String cdName;               
        protected int cdCopies;
        protected double cdPrice;
        protected String genre;
        //Constructor
        CD(int cdSku, String cdName, int cdCopies, double cdPrice, String genre) {
            this.cdSku    = cdSku;
            this.cdName   = cdName;
            this.cdCopies = cdCopies;
            this.cdPrice  = cdPrice;
            this.genre = genre;
        // This method tells the sort method what is to be sorted     
        public int compareTo(Object o)
            return cdName.compareTo(((CD) o).getName());
        // Calculates the total value of the copies of a CD
        public double totalValue() {
            return cdCopies * cdPrice;
        // Tells the caller the title
        public String getName() {
            return cdName;       
        //Displays the information stored by the constructor
        public String toString() {
            return String.format("SKU=%2d   Name=%-20s   Stock=%3d   Price=$%6.2f   Value=$%,8.2f",
                                  cdSku, cdName, cdCopies, cdPrice, totalValue());
    } // end CD class    
         //Class used to add items to the inventory, display output for the inventory and sort the inventory
    class Inventory {
        private CD[] cds;
        private int nCount;
         // Creates array cds[] with 10 element spaces
        Inventory() {
            cds = new CD[10];
            nCount = 0;
         // Used by main to input a CD object into the array cds[]
        public void add(CD cd) {
            cds[nCount] = cd;
            ++nCount;
            sort();               
         //Displays the arrays contents element by element
        public void display() {
            System.out.println("\nThere are " + nCount + " CD titles in the collection\n");
            for (int i = 0; i < nCount; i++)
                System.out.println(cds);
    System.out.printf("\nTotal value of the inventory is $%,.2f\n\n", totalValue());
         // Steps through the array adding the totalValue for each CD to "total"
    public double totalValue() {
    double total = 0;
    double restock = 0;
    for (int i = 0; i < nCount; i++)
    total += cds[i].totalValue();                
    return total;
         //Method used to sort the array by the the name of the CD
    private void sort() {
         Arrays.sort(cds, 0, nCount);
    } // end Inventory class
    // Subclass of CD. Creates new output string to be used, adds a restocking fee calculation and genre catagory to be displayed.
    class CDWithGenre extends CD {
         String genre;
         CDWithGenre(int cdSku, String cdName, int cdCopies, double cdPrice, String genre) {
    super(cdSku, cdName, cdCopies, cdPrice, genre);
    this.cdName = cdName;
              this.cdCopies = cdCopies;
    this.cdPrice = cdPrice;
    this.genre = genre;
    // Calculates restocking fee based on previous data.
    public double restockFee() {
         double total = 0;
         double restock = 0;
         total = cdCopies * cdPrice;
         restock = total * .05;
    return restock;
    // New output method overrides superclass's output method with new data and format.
         public String toString() {
              return String.format("SKU: %2d     Genre: %-12s     Name: %-20s     \nPrice: $%6.2f Value: $%,8.2f Stock: %3d      Restocking Fee: $%6.2f\n",
    cdSku, genre , cdName, cdPrice, totalValue(), cdCopies, restockFee());
         }// Ends CDWithGenre class
    would I make a new class calling it GUI or whatever, in there extend JFrame and add a JTextArea and JScrollpane there? Would I need to make the class public or just an internal class?

  • How can you create a linked list? GUI?

    I have the following program that I wrote:
    package damagecounter;
    import java.io.*;
    import java.util.*;
    public class Main
         public static void main (String[] args) throws Exception
              String logline;
              Player player1 = new Player("Kazzandar");
              try
                   BufferedReader logfile = new BufferedReader(new FileReader("TeilmonRun.txt"));
                   logline = logfile.readLine();
                   while (logline != null)
                        if (logline.startsWith (player1.getName (), 0))
                             if (logline.contains ("recites"))
                                  player1.recites++;
                             if (logline.contains ("rescues"))
                                  player1.rescues++;
                             if (logline.contains ("utters the words"))
                                  player1.spells++;
                             if (logline.contains ("sprawling with a powerful bash."))
                                  player1.bashes++;
                             if (logline.contains ("got toasted by"))
                                  player1.deaths++;
                             if ((logline.contains ("-=")) && (logline.contains ("=-")))
                                  if (logline.startsWith (player1.getName (), 0))
                                       String damage = logline.substring(logline.indexOf ("-=") + 2 , logline.indexOf ("=-"));
                                       player1.setDamage (Integer.parseInt (damage));
                        logline = logfile.readLine ();
              catch (Exception e)
                   System.out.println ("Log file not found or corrupt.");
                   e.printStackTrace();
              player1.printStats();
    }As of right now the code require a person to enter the name of a player and then scans the log file to determine the appropriate counts for that player. If I want to scan the file for multiple players how would I be able to do that without having to run the program over and over. The reason being that sometimes the logs have over 15 different players and I'd hate to have to run the program 15 times to get each players stats. Any suggestions? Would I have to make a linked list?

    Yes, the log file looks something like that. Here is a small 15 line version of what the log file actually looks like:
    Kazzandar's stab misses Icingdeath. -=0=-
    Arien's slash >>> ANNIHILATES <<< Icingdeath! -=118=-
    Arien's slash >>> ANNIHILATES <<< Icingdeath! -=112=-
    Arien's slash <<< ERADICATES >>> Icingdeath! -=158=-
    Parrish utters the words, 'yjrr pzar'.
    Arien rescues Shargaas!
    Kazzandar's counterattack does UNSPEAKABLE things to Icingdeath! -=636=-
    Icingdeath's claw does UNSPEAKABLE things to Arien! -=760=-
    Arien's fireball scratches Icingdeath. -=4=-
    Arien's lightning bolt grazes Icingdeath. -=7=-
    Arien's counterattack -- DESSICATES -- Icingdeath! -=540=-
    Icingdeath's claw COMPLETELY TRASHES Arien! -=802=-
    Arien is DEAD!
    Kitiara's fireball grazes Icingdeath. -=5=-
    Kitiara's lightning bolt grazes Icingdeath. -=8=-
    Almost always the player name is first but sometimes the "mob" name (In this case Icingdeath) comes out. I don't mind if Icingdeath is referenced as a player and included in the stats, not that big a deal. Thanks for the idea on the HashMap I'll looking into how it works. Since this is my first Java program I often find myself lost at where to begin.
    I changed "got toasted by" to "is DEAD!" since it's easier to read. I also changed the majority of the main code into a method for the player class. The main code looks like this now:
    public static void main (String[] args) throws Exception
              Player player1 = new Player("Shargaas");
              player1.scanLogForStats("TeilmonRun.txt");
              player1.printStats();
         I was hoping this would make it easier, anyway, thanks again and I'll definitely be looking into HashMap.

  • Send output to gui control

    I tried searching for an answer but sometimes forming the question can be an issue...
    I want to make a GUI with two controls, say period and frequency. I want it to be possible for the user to specify either one of these two values, and the other value is calculated and shown in the other control. So if I choose a period of 500us, the frequency control is updated to show 2kHz. Or if I choose a frequency of 2kHz, the period control is updated to show 500us. I can enter input into either control and the other is updated with the corresponding result.
    Is there a way to do this? If so, how?

    You just need to write to a local variable of the control in your value change event.

  • Can i put a link in a GUI that will open in Explorer?

    Hi all,
    Just wondering if it would be possible for me to add to action listener to something that would allow me to open a link whenever it was clicked on? not really sure where to start looking for this so any help would be great.
    Cheers

    Well, if you specifically know the name of the application in question and how it accepts parameters, you can try using Runtime.exec()
    If you're willing to sacrifice platform independence (which it sounds like you are, since you specifically mentioned Explorer), you can try using the NTVDM "call" command, which taps into the file associations in the registry and launches the appropriate application.
    I guess it would depend on the exact functionality you want. :)

  • How do i create a GUI which links to other GUI's by pressing a JButton

    hi;
    i am trying to write a small program which reads a text file and which can update and save to the
    file as well as just view it. This i can do, but, i intend to create a main GUI from which you can
    select JButtons which will bring up different GUI's depending on which JButton has been pressed.
    i.e. one GUI for viewing certain data, another for updating the file etc....
    is this possible? and if so, how?
    cheers
    IK

    I did something similar. I had a Dialog which used the BorderLayout, the North was a title/section info, the Center part was to be changed on a button click to a different panel, the South was navigation like Next, Back, and Cancel/Finish. I got everything to work, but when I clicked the button and the method updated the center panel, it would not change to the new panel. I never figured out why it didnt do it.

  • Linking "ant" project with GUI

    Hello,
    I have an "ant" project (is a speech recognition system) that I want to link to a GUI. I did not make the "ant" project but I know how to use it; I have no experience working with "ant" projects or files.
    Does anyone have any ideas? or, Does anyone have a link where I can learn more about "ant"? I'm using netbeans for my application. I googled ant but have not found anything that can help; I'll keep googling but suggestions are appreciated.

    I googled ant but have not found anything that can help; I'll keep googling but suggestions are appreciated.http://ant.apache.org/
    ~

  • How to make site root-relative links work in DW and Server both?

    See details on buggy DW image link behavior, below. My question is:
    1) how to make site root-relative links work in DW and Server both? Or…
    2) how to reliably automate the change of several hundred legacy root-relative links of the form
    /images/image.jpg  to document-relative?
    That is, to
    ../images/image.jpg or
    ../../images/image.jpg or
    ../../../images/image.jpg etc…depending on where the directory is.
    The old format (/images/image.jpg ) used to work fine in my previous DW 8 configuration but appear grey in DW after “upgrading” to DW cs5.5 mac. (they look fine on the server, but it’s hard to edit image-heavy pages locally when they are all grey).
    I tried changing the files to how DW creates root relative links now:
    /public_html/images/image.jpg, which is a very easy, attractive root flow since there’s a one-to-one mapping. These look great in DW but are broken on the server!
    I looked at the “advanced” site setup, and it looked like it might be possible to nuke the /public_html/ part of my server info…but it also looked like there was the potential for doing damage changing these settings, which are automatically generated from our server connection settings, which seem to work.
    The “links relative to document/ site root” toggle…does that change how DW interprets existing links, or just change the default when you are adding a link?  I have made 80% of the file links document relative…before wondering if root-relative isn’t better?
    It sure seems less ambiguous for all those images if theres a way to make root relative work for DW design view, DW link check, and server.
    Summary of buggy behavior: (see test with images here)
    "old style" site root link
          /images/img_book/WScover120x150_NEW.jpg
          Design veiw in DW: broken (grey w/ broken icon)
          Link check in DW: "external link" (i.e., uncheckable, + file could appear orphaned)
          Browser: good
          Ease of switching: n/a (existing format)
    "new style" site root relative link
          /public_html/images/img_book/WScover120x150_NEW.jpg
          Design veiw in DW: good
          Link check in DW: good
          Browser: broken
          Ease of switching: easy
    Document relative link
          ../../images/img_book/WScover120x150_NEW.jpg
          Design veiw in DW: good
          Link check in DW: good
          Browser: good
          Ease of switching: hard (how to automate?)
    Absolute link
          http://www.oasisdesign.net/images/img_book/WScover120x150_NEW.jpg
          Design veiw in DW: broken (grey w/ broken icon)
          Link check in DW: external (i.e., uncheckable, + file could appear orphaned)
          Browser: good
          Ease of switching: n/a...not a real option
    Thanks!
    Similar discussion on "/"

    Hello again Jon!
    Thanks for jumping on this.
    All clear and understood about where publc_html is etc.
    No contemplation of nuking the actual public_html directory on the server, just the "/public_html" text string at the start of the DW-generated links.
    "/public_html" is automatically added to the front of the link in DW if I create the link with any of the GUI tools, if I have "site root relative" selected. And ""/public_html" ends up in the code, and gets uploaded that way to the server, where it (obviously) doesn't work.
    Doesn't sound like it is supposed to work this way. Also, what seems to be the usual root relative format (/images/image.jpg) shows as a broken link in the GUI and an external link in the DW link check. All this togther makes me thinkI have some obscure setting incorrect?
    The setting that caught my eye is manage sites/ site setup/ advance settings/ local info/ web url,  which is automatically set to http://www.oasisdesign.net/public_html/
    it gives an option to change it but it makes every effort to make this NOT look like something users should mess with:
    Having gone through the more careful thought process during this post, I'm ready to do the experiment of changing the remote server web URL (why is it wrong by default?)...think I'll eat dinner first so there's 45 min to avert disaster if anyone knows this to be a bad idea!
    Art
    PS--don't  have a local testing server...don't think this will solve the GUI broken link/ link shows as external problems.
    Is there an easy, automated way to change links sitewide from document to root relative?

  • WebDynpro proxy page with Webdynpro iView and SAP Gui for html iView

    Hello,
    I have a requirement to have a page that has at the top of it a webdynpro for java iView screen with several links that when pressed pop-up various data pulled from the back-end. This part is fine and presents no problem. Beneath this the requirement calls for a SAP Gui for HTML iView to be displayed. Which is no problem either. The problem occurs when one of the links in the java webdynpro application at the top of the screen is pressed it causes the SAP Gui for HTML portion to refresh and come back to the beginning. So for example you first navigate to this screen and you go into the sap gui for html portion and drill into 2 or 3 screens in the sap gui for html transaction. If you then press one of the webdynpro links the sap gui for html (which is a separate iView) refreshes and you are taken back to the initial screen. This only occurs when using a web dynpro proxy page. If I use a standard page the SAP Gi for html does not refresh. Unfortunately there are other things not mentioned here that require us to use the webdynpro proxy page.
    Any help is greatly appreciated,
    Bert

    Use System admin -> System Config and find your system in the PCD (under portal content). Right click and open -> permissions. Find a user or group or role and give it the end user permission. I'd suggest the group Everyone.
    Cheers

  • To redirect System.out stream output on swing's JTextArea

    Following is a program that needs to print output as follows:-
    EXPECTED OUTPUT ON GUI:_ In action block (datapayload value) In Routing block (argus value)
    PRESENT PROGRAM OUTPUT ON GUI_ In action block (datapayload value)
    please examine the below code and correct mistakes to get the expected output as given above.....
    I am not getting the second line as output on GUI i.e., In Routing block (argus value)
        import java.awt.*;
        import javax.swing.*;
        import java.awt.event.*;
        import java.io.*;
        public class Demo extends JFrame implements ActionListener
          JTextField datapayload;
          JLabel Datapayload;
          JButton submit;
          JTextArea textFieldName;
          public Demo()
             DemoLayout customLayout = new DemoLayout();     
             getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
             getContentPane().setLayout(customLayout);
             Datapayload = new JLabel("Enter DataPayload:");
             getContentPane().add(Datapayload);
             datapayload = new JTextField("abcd...");
             getContentPane().add(datapayload);
             submit = new JButton("submit");
             getContentPane().add(submit);
             textFieldName = new JTextArea(80,10);
             textFieldName.setEditable( false );
             JScrollPane scroll = new JScrollPane(textFieldName) ;
             scroll.setBounds( 10, 60, 225, 150 );
             getContentPane().add( scroll );
             submit.addActionListener(this);
             setSize(getPreferredSize());
           public void actionPerformed(ActionEvent e)
              String demodata=datapayload.getText();
                 textFieldName.append("In Action Block"+"\t"+demodata);  
              Demo pr = new Demo();                              
              pr.DemoRoute(demodata);
           public void DemoRoute(String argus)
                 textFieldName.append("In routing block"+"\t"+argus);
            public static void main(String args[])
                 Demo window = new Demo();
                 window.setTitle("Demo");
                 window.pack();
                 window.show();
        class DemoLayout implements LayoutManager
           public DemoLayout() {  }
           public void addLayoutComponent(String name, Component comp) {   }
           public void removeLayoutComponent(Component comp) {  }
           public Dimension preferredLayoutSize(Container parent)
             Dimension dim = new Dimension(0, 0);
             Insets insets = parent.getInsets();
             dim.width = 320 + insets.left + insets.right;
             dim.height = 240 + insets.top + insets.bottom;
             return dim;
           public Dimension minimumLayoutSize(Container parent)
             Dimension dim = new Dimension(0, 0);
             return dim;
           public void layoutContainer(Container parent)
             Insets insets = parent.getInsets();
             Component c;
             c = parent.getComponent(0);
             if (c.isVisible()) {c.setBounds(insets.left+90,insets.top+8,172,26);}
             c = parent.getComponent(1);
             if (c.isVisible()) {c.setBounds(insets.left+230,insets.top+8,172,26);}
             c = parent.getComponent(2);
             if (c.isVisible()) {c.setBounds(insets.left+230,insets.top+52,142,26);}
             c = parent.getComponent(3);
             if (c.isVisible()) {c.setBounds(insets.left+90,insets.top+100,472,268);}
        }  Edited by: 997189 on Mar 31, 2013 8:52 AM

    Hi,
    change your actionPerformed() method as below to get the required output.
    public void actionPerformed(ActionEvent e)
              String demodata=datapayload.getText();
                 textFieldName.append("In Action Block"+"\t"+demodata);  
              //Demo pr = new Demo();      You are creating a new object to all DemoRoute method. This is the problem                         
              //pr.DemoRoute(demodata);
                 this.DemoRoute(demodata);
    }And also my suggestion is follow java coding conventions while coding

  • Fax output - Chinese characters are garbled

    Hello,
    We are using fax output for two forms ( One smartform and the othe sap script). Both the form outputs are thorugh  the same fax device. For the smartform output there are no issues and the output is as expected but for the sap script output the chinese characters are garbled. Instead of the chinese characters i get output like _____ _______>,<%,,<< etc.
    Interestingly, if i have a look at the print preview or take print out there is no issue and the characters are as expected. The issue arises only during fax.
    Can someone help pls?
    Thanks,
    Venkat

    HI friend,
    I found few same post in SDN which are related to this Chinese characters in SAP Scripts.
    Please see this link and find is the problem is same as yours if so make use of it.
    Link: [Output of Sapscript in Chinese language|Output of Sapscript in Chinese language;
    Link: [Problem displaying Chinese Characters|Problem displaying Chinese Characters in SAP script form WESCHEINVERS1;
    I think these will be helpful please revert back to me after going through the links.
    Thanks,
    Sri Hari

Maybe you are looking for

  • Adobe Presenter 9 installation issues

    I'm installing Adobe Presenter 9 on Windows 8 MS powerpoint 2010 and receive the following error messages - have tried rebooting and reinstalling and still receive these: Exit Code: 7 Please see specific errors below for troubleshooting. For example,

  • Need Help for Blackberry8700g

    I need help for Blackberry8700g, It is the error message Java.lang.outofmemory Error. I can not make even phone calls. After reset it is same message pop up and does not off the power jum error523 

  • Fios App on both Xbox and IPad

    I recently subscribed to both fios tv and internet double play option and Ive been trying to get these 2 apps to work. Both say I do not have the services needed. I have 50/25 internet, and HD set top box (prime HD), so I should be able to use both o

  • Financial reporting prompts

    Hi, Could anybody help in this: I have to create a report in Hyperion Financial Reporting based on the user prompt. Suppose user enters Nov in the prompt for the Period dimension. I have to show data for Sep Oct Nov months in the report. I have done

  • Fixed row in JTable

    Dear All Does anyone know how to fix a row in a JTable, for example, to fix the bottom row in a JTable, so that users can scroll through the rest of the rows in the table without affecting this row. But when if a column size is changed, it will resiz