Over-writing the same line of output

Hi,
I want write a message in a specific position of the command prompt window (the window that we can see when we start a little java application).
It is possible using out.println and how I can provide information to do this? I'm looking for something like this System.out.println(3, 4, message), where the first two digits indicate that the message have to be written in row 3 and column 4 of the command prompt window.
Thank you.
Have a nice day.
bonsi

Thank You for the hint.
I'll try with jcurses.
Have a nice day
bonsi

Similar Messages

  • Is there a way to print over the same line of text?

    Hey everyone, does anyone know if it's possible to write over the same line in a console window? I am formatting a diskette an currently it is going:
    1 percent complete
    2 percent complete
    3 percent complete
    4 percent complete
    5 percent complete
    I am currently doing:
    System.out.println(bufferedReader.readLine());
    to display this .. is there anyway to write over and over on the same line?
    Thanks again.

    I just thought of something!!! Try this:
    System.out.println("When the zeros have printed twenty times the disk has been formatted\n");
    System.out.println("|-----------------------------------|"\n)
    Then add the zeros to the line underneath it as it formats.  This will give a progress bar effect.  The zeros, when completely done, should fill up the whole |---| segment.
    Hope this helps.
    Virum                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to align output formatted and output text in the same line?

    Hi All,
    I want an output formatted label and a text on the same line,. I've surrounded these components wth a panel form layout and they automatically align one below the other. how do I kepe them in the same line?
    Thanks.

    Try as per the code snippet below:
    <af:document title="TestPage.jspx" id="d1">
    <af:messages id="m1" inline="true"/>
    <af:form id="f1">
    *<af:panelGroupLayout id="pgl1" layout="horizontal">*
    *<af:outputFormatted value="outputFormatted1" id="of1"/>*
    *<h:outputText value="outputText1" id="ot1"/>*
    *</af:panelGroupLayout>*
    </af:form>
    </af:document>
    Thanks,
    Navaneeth

  • Grand Total on the same line. See Output requirment.

    Env:Oracle 9I Report Writer
    If I have a Table with the flwg data:
    TableA
    Col1   Col2  Col3   Amt
    1                   10
    2                   20
    3                   30
    4                   40How can I get the report output in the format below:
    ....            Amt    Total
                    10
                    20
                    30
                    40     100Is this possible?

    Yes
    presumably your total is in a repeating frame above the detail. What you need to do is make your detail repeating frame shorter than the page width. Your total repating frame should extend to the page width. You an then insert your total on the same line as the detail.
    This will probably put the total at the top, rather than the bottom. I think you can get around this by using anchors

  • How can I stay on the same line  when inputting values in the CLI?

    The title is a bit vague i know :) but i have this issue which isn't really a problem but it would be better if I can solve it.
    Intro)
    I've made this simple addition (and more options but thats not relevant) application for kids in my spare time so that they can train their maths in school and compare their results with other students which is saved in the database using the hypersonic DB that comes with the JBoss application server.
    Now so far so good, but i'm having an issue with the Scanner (I think, but i doubt its because of the CLI) , when i enter a number or text it works and exceptions will be catched etc but when i press the enter key without anything entered the input value wil be displayed a line below and that's not what I want. I want it to stay in the same line.
    Sample CLI output:
    bla application
    ***By: deAppel***
    Ver: 31/10/2007
    Your name:     deAppel
    Your class:     MasterClass
    How many sums you want to make? 14
    Time: 22:03:27
    1: 32 + 40 =     72
    2: 38 + 19 =     57
    3: 5 + 57 =     62
    4: 30 + 20 =     1
    5: 57 + 54 =     2
    6: 33 + 17 =     3
    7: 38 + 54 =     4
    8: 23 + 23 =     5
    9: 48 + 47 =     95
    10: 29 + 55 =     6
    11: 48 + 11 =     7
    12: 1 + 40 =     41
    13: 46 + 35 =     91
    14: 23 + 52 =     75
    Answer 1:      72     You answered:      72     (good)
    Answer 2:      57     You answered:      57     (good)
    Answer 3:      62     You answered:      62     (good)
    Answer 4:      50     You answered:      1     (wrong)
    Answer 5:      111     You answered:      2     (wrong)
    Answer 6:      50     You answered:      3     (wrong)
    Answer 7:      92     You answered:      4     (wrong)
    Answer 8:      46     You answered:      5     (wrong)
    Answer 9:      95     You answered:      95     (good)
    Answer 10:      84     You answered:      6     (wrong)
    Answer 11:      59     You answered:      7     (wrong)
    Answer 12:      41     You answered:      41     (good)
    Answer 13:      81     You answered:      91     (wrong)
    Answer 14:      75     You answered:      75     (good)
    EndTime: 22:04:18
    Total good: 6
    Total wrong: 8
    Total sums answered: 14
    Final score: 42.857143%
    Upload score? (yes/no): no
    Compare score from other users? (yes/no): no
    Want to try again? (yes/no): no
    ********Made by: deAppel @ http://www.link removed cause it doesnt matter .com*********
    ************The application will close within 5 seconds*************
    To sum it up for those that don't like to read my post:
    1: 32 + 40 = 72
    2: 38 + 19 =
    whitespace <-- this happens because of the enter
    whitespace <-- this happens because of the enter
    57
    3: 5 + 57 = 62
    I want the input to stay in the same line unless you have typed something. I feel silly for not knowing how to handle this.
    Hm.. i'll tried to solve it myself but it seems that im unable to do that.
    /me takes a quick coffee break and will look at the code again after that *

    paulcw wrote:
    It sounds like you want either a CURSES implementation (I believe there's one for Java), or just move to a GUI.I was planning to create a GUI for it eventually, but i just wanted to solve this one first and make sure everything works the way i want it too. I'll take a look at the CURSES implementation thanks.

  • SAPScript: How to combine two text in the same line?

    Dear Gurus,
    I have a case to combine hard code text and long text in the same line.
    For example, i need to display following line:
    'Project name:' <long_text>
    How to do it in SAPScript?
    Can we do it with following code?
    /: 'Project name: ' INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&
    Thanks & Regards,
    Ari

    Hi,
        You can achieve that by this method,
    Goto Tcode SO10
    Give the Object Name 'Z_TEST' & Id
    See the Paragraph format for the Text,  you can do it from Menu
    Format>Line . If it is /: change it to =.  Save
    Now in the SAPScript Text editor in which you want to print
    P1 'Project Name :'
    /: INCLUDE Z_TEST OBJECT TEXT ID ST LANGUAGE &NAST-SPRAS&
    the output will be
    Project name : Abc xyz
    Regards
    Bala Krishna.
    Edited by: Bala Krishna on Oct 17, 2008 7:11 PM

  • How to get the Hardcoded text and the Standard text in the same line

    Hi,
    I have an SAP Layout. In that, it should show the Consignee name as below.
         Consignee: SAP LABS
    In this, the text 'Consignee: ' should be hardcoded in the layout itself. and the customer has requested to create a standard text for 'SAP LABS' sothat if they want to change the value in future, they would go and change the Standard text. I have created the Standard Text for SAP LABS. I am not able to get both these texts on the same line. I wrote in the layout like below and AS is the Paragraph format.
    AS     Consignee:
    /:        INCLUDE ZVRU_CONSIGNEE OBJECT TEXT ID ST LANGUAGE EN PARAGRAPH 'AS'
    But, both are coming in dofferent lines. As /: is a command line, it is coming in the next line. Is there any way of getting these two texts in the same line..? While Inserting the Standard Texts, will there be any option/command to print it in the same line..?
    Please share your thoughts. Thanks in advance.
    Thanks & Regards,
    Paddu.

    Hi Paddu,
    I have had a similar requirement. I did not use any FM or anything, simply did the following:
    In  SO10, for your standard text where u have used the text SAP LABS.
    Instead of P1/ default para, change it to =. And then Save ur Standrd text.
    Now in the SAPScript Text editor in which you want to print
    P1 'Consignee :'
    /: INCLUDE TEST OBJECT TEXT ID ST LANGUAGE EN
    the output will be
    Consignee : SAP LABS
    I have tried and tested this method. It will surely work.
    With regards,
    Niharika.

  • How to write two item in the same line?

    In the smartforms,how to write two item in the same line?
    eg
    1   *************                                    2  *****************
    3  **************                                   4  ******************
    5  ***************
    Anyone got any idea to do this.
    Thanks in advance

    Hi,
    In the smartform the main windows is 20cm.I use the table output my data.Because the output is two item in same line,I define two rows in the table line type.
    Question:
    Should I define the table width 20cm?
    In the main area of table , should I define two folders and each of folder include a line? The second item I had already defined as Append Directly,but the item 1 and item 2 don't in the same line.
    Regards

  • Filling line capacities for different products for the same line

    Hi,
    I have a filling  Line PL1.  Capacity is 24 hours.On this we can process products A and B.I have defined rate routing and assigned to the production versions in the respective Material master. Now my requirement,
    If the product A is processed on PL1,maxmum run length is for 24 hours and the machine must be stopped for cleaning after this time for 2 hours.If the product B is processed on PL1,maximum run length is for 36 hours and the machine must be stopped for cleaning after this time for 4 hours.A and B can be planned on the same filling line back to back without a major change over and the filling line can be used continuously for 36 hours.But B and A cannot be planned on the same filling line back to back without a major change over  and change over is required.
    How do we map in the routing and where we maintain the conditions of 24 hous max run lentgth if product is A and 36 hours max run length if product is B....
    Thanks
    Hemanth

    Hi Suresh,
    Thanks for your quick reply. In my  rate routing i maintain base qty 1000L and production time 1 hour tear down 2 hour for filling line FL1 with capacity 24 hours for Product A and maintain base qty 500L and production time 1 hour tear down 4 hour for filling line FL1 with capacity 24 hours for Product B.
    Is it correct?
    But where we are giving max length of run as 24 hours if  product  is A and Max lenght of run 36 hours if  product is B...
    Thanks in Advance
    Hemanth

  • Retrieve n and n-1 rows on the same line

    In a database I am trying to get the latest employee information and the previous entry. The latest entry can be determined by the fact that DATEFIN is empty and the previous entry is returned by MAX(DATEFIN). All previous entries have a DATEFIN value
    So I wrote a query which returned both the lines per employee. i.e. n and n-1
    Actually what is needed is to compare certain fields of each line, so I need to show employee n and n-1 on the same line. This time I used LEAD so emp,date,field1,Lead(field1,1) etc etc.
    As all the employee lines are returned, I used a minus function to remove all those where the DATEFIN IS NOT NULL, given that the LEAD line returned the information required BEFORE the minus removed it.
    However, I am still getting n and n-1 rows, even though the minus part run by itself removes n-1,n-2... rows.
    Question
    How can I structure the minus or LEAD query just to get the n row and n-1 LEAD information
    select trim(to_char(se.idexport,'0999'))
    || '|'
    || sa.referentiel_id
    || '|'
    || sa.idunique
    || '|'
    || sa.matricule
    || '|'
    || sr.niveau
    || '|'
    || LEAD(sr.niveau,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    || '|'
    || sr.echelon
    || '|'
    || sr.coefficient
    || '|'
    || fo.code
    || '|'
    || sr.salairemensuel
    || '|'
    || sr.tauxhoraire
    || '|'
    || to_CHAR(ca.datevaleurrevisions,'DD/MM/YYYY')
    || '|'
    || em.code
    || '|'
    || fi.code
    || '|'
    || cc.code
    || '|'
    || sr.datedebut
    || '|'
    || LEAD(sr.datedebut,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    || '|'
    || sr.datefin
    || '|'
    || LEAD(sr.datefin,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    AS Text
    from salarie sa
    inner join selection_export se on (se.IDUNIQUE = SA.IDUNIQUE AND se.idexport = 42 AND se.exporter = 1)
    inner join salarierevision sr on (SR.SALARIE_ID = se.IDUNIQUE AND SR.ACCESRESTREINT = 0)
    inner join campagne ca on CA.ISANNEEENCOURS = 1
    inner join parambranche pb on (ca.organisationlds_id = pb.organisationlds_id)
    inner join utilisateur u on (u.CODE = 'gagross' AND U.ORGANISATIONLDS_ID = CA.ORGANISATIONLDS_ID)
    left outer join fonction fo on (fo.id = sr.fonction_id)
    left outer join emploi em on (em.id = sr.emploi_id)
    left outer join filiere fi on (fi.id = sr.filiere_id)
    left outer join CONVENTIONCOLLECTIVE cc on (cc.id = sr.CONVENTIONCOLLECTIVE_ID)
    minus
    select trim(to_char(se.idexport,'0999'))
    || '|'
    || sa.referentiel_id
    || '|'
    || sa.idunique
    || '|'
    || sa.matricule
    || '|'
    || sr.niveau
    || '|'
    || LEAD(sr.niveau,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    || '|'
    || sr.echelon
    || '|'
    || sr.coefficient
    || '|'
    || fo.code
    || '|'
    || sr.salairemensuel
    || '|'
    || sr.tauxhoraire
    || '|'
    || to_CHAR(ca.datevaleurrevisions,'DD/MM/YYYY')
    || '|'
    || em.code
    || '|'
    || fi.code
    || '|'
    || cc.code
    || '|'
    || sr.datedebut
    || '|'
    || LEAD(sr.datedebut,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    || '|'
    || sr.datefin
    || '|'
    || LEAD(sr.datefin,1) OVER (ORDER BY sr.salarie_id,sr.datedebut desc )
    AS Text
    from salarie sa
    inner join selection_export se on (se.IDUNIQUE = SA.IDUNIQUE AND se.idexport = 42 AND se.exporter = 1)
    inner join salarierevision sr on (SR.SALARIE_ID = se.IDUNIQUE AND SR.ACCESRESTREINT = 0)
    inner join campagne ca on CA.ISANNEEENCOURS = 1
    inner join parambranche pb on (ca.organisationlds_id = pb.organisationlds_id)
    inner join utilisateur u on (u.CODE = 'gagross' AND U.ORGANISATIONLDS_ID = CA.ORGANISATIONLDS_ID)
    left outer join fonction fo on (fo.id = sr.fonction_id)
    left outer join emploi em on (em.id = sr.emploi_id)
    left outer join filiere fi on (fi.id = sr.filiere_id)
    left outer join CONVENTIONCOLLECTIVE cc on (cc.id = sr.CONVENTIONCOLLECTIVE_ID)
    where sr.datefin is not null
    Thanks and I hope this is clear
    Colin

    Assuming that the sr.salarie_id column identifies the employee I think you need to partition by it, not order by it in the analytic functio. If it does not identify the employee, then you need to partition by whatever uniquely identifies an employee. I would likely structure it something like this:
    SQL> with t as (
      2     SELECT 1 emp_id, TO_DATE('01-jul-2010', 'dd-mon-yyyy') dt, 'Jul' descr
      3     from dual union all
      4     SELECT 1, TO_DATE('01-aug-2010', 'dd-mon-yyyy'), 'Aug' from dual union all
      5     SELECT 1, TO_DATE('01-sep-2010', 'dd-mon-yyyy'), 'Sep' from dual union all
      6     SELECT 1, TO_DATE('01-oct-2010', 'dd-mon-yyyy'), 'Oct' from dual union all
      7     SELECT 1, TO_DATE(NULL), 'Current' from dual union all
      8     SELECT 2, TO_DATE('01-jan-2010', 'dd-mon-yyyy'), 'Jan' from dual union all
      9     SELECT 2, TO_DATE('01-mar-2010', 'dd-mon-yyyy'), 'Mar' from dual union all
    10     SELECT 2, TO_DATE('01-may-2010', 'dd-mon-yyyy'), 'May' from dual union all
    11     SELECT 2, TO_DATE('01-jul-2010', 'dd-mon-yyyy'), 'Jul' from dual union all
    12     SELECT 2, TO_DATE(NULL), 'Current' from dual)
    13  SELECT emp_id, curr_dt, last_dt, curr_descr, last_descr
    14  FROM (SELECT emp_id, dt curr_dt,
    15               LEAD(dt) OVER(PARTITION BY emp_id
    16                             ORDER BY dt desc nulls first) last_dt,
    17               descr curr_descr,
    18               LEAD(descr) OVER(PARTITION BY emp_id
    19                             ORDER BY dt desc nulls first) last_descr
    20        FROM t)
    21  WHERE curr_dt IS NULL
        EMP_ID CURR_DT     LAST_DT     CURR_DE LAST_DE
             1             01-OCT-2010 Current Oct
             2             01-JUL-2010 Current JulWhere my t is your set of joined tables without the where sr.datefin is not null predicate.
    John

  • How can I place multiple choice boxes on the same line instead of in a column?

    I know it is possible to place multiple fields on the same line, using drag and drop.
    But to save space, I would like to have 3 or 4 multiple choice boxes next to each other on one line. 
    Is this possible, and if so, how?
    Thanks
    Peter

    You may click on the "+" button to the right of the first multiple choice box to add more in the same line. When you hover over the button, the tooltip says "insert item beside".

  • Checkbox and 2 Textbox in the same line

    Hi,
    I am having a problem trying to show one checkbox and two textboxes at the same line,
    the problem is with the text (comment) I want to display for each item.
    when I try to activate or run  the report , I got this error message :
    Error when generating the selection screen "1000"
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN POSITION 1.
      parameters:
      ck1 AS CHECKBOX ,
      p_u  like rlgrap-filename  default 'C:\data\',
      p_ux(9) default '500'.
      "SELECTION-SCREEN COMMENT 4(10) text-c01 for FIELD ck1.
      "SELECTION-SCREEN COMMENT 17(10) text-c02 for FIELD p_u.
      "SELECTION-SCREEN COMMENT 30(10) text-c03 for FIELD p_ux.
       SELECTION-SCREEN end OF LINE.
    I think the problem is with the position of the comment ?
    how to fix this?
    Thanks
    Misbah

    Hi  Misbah ,
    i had faced a similar issue some months ago, following is the solution----->>>
    SELECTION-SCREEN BEGIN OF BLOCK F WITH FRAME TITLE TEXT-014.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(18) text-015.
    PARAMETERS : P_DNR(10) TYPE C.
    SELECTION-SCREEN COMMENT 35(14) text-016.
    PARAMETERS : P_ST  AS CHECKBOX.
    SELECTION-SCREEN COMMENT 56(8) text-017.
    PARAMETERS : P_IC  AS CHECKBOX.
    SELECTION-SCREEN COMMENT 72(14) text-018.
    PARAMETERS : P_CA  AS CHECKBOX.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK F.
    OUTPUT LOOK AS BELOW------>>>>>
    Debit Entry Number  ___________   Stock Transfer [ ]      IC Sales [ ]       Credit Allowed [ ].
    HERE,  Debit Entry Number, Stock Transfer, IC Sales, Credit Allowed are the text sysmbols saved at 015, 016,017 and 018.
    see the above code , the logic is the text stored in text 15 is of length 18.
    after which i print a blank input field i.e the parameter p_dnr which is of length 10.
    so now the next text or field has to be printed at 18 + 10 =  28.
    so 28 or any number more than 28 should be the starting position of the next text or parameter or checkbox  , etc.
    similarly u have to calculate the start position and end position  for all the selection screen variables ur printing in a line .
    if the calculation goes wrong and variables in a line get overlapped on each other , then u get an error message as u r getting now.....something like selection screen error.
    Regards,
    Akash Rana

  • I want to perform bidirectional i/o using a pci-6534.The problem is that i need to use the same lines for i/p and o/p. is that possible?

    I want to perform bidirectional i/o using a pci-6534.The problem is that i need to use the same lines for i/p and o/p. is that possible? And if it is how an i doing this?

    Hi I Pant,
    The idea that crossed my mind was to tie each of the lines coming from/going to "your device" to two of the DIO lines. Configure one these two ports as input, the other as output.
    When you want to read the state of the line, read from the line configured as input. Similarly, use the other port when it is time to write.
    Provided "your device" uses tri-state drivers/receivers, or can be used in a "wired-OR" configuration, this may work.
    What is "your device"?
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Insert an attachment while writing the same

    Good night,
    Do you know how we can to insert an attachment/file in an email but while writing the same, for example, when we reply a message "... please see the attached file..." and insert then the file.
    I only see that this only is possible if we for example press on the file (on Docstogo) and send, and then e open a new email already with the attachement.
    Could you please help me.
    Thanks

    alphabet soup,
    Yes, windows helpfully prevents two processes from accessing a file simultaneously. Operating Systems on the other hand uniformly support it.
    Which probably doesn't help you very much, as I imagine that you can't just up and change the source machine over to *nix, but there you have it.
    You'll just have to close the program which has the database open, copy the database, and restart the program which uses the database.
    keith.
    Message was edited by: corlettk

  • Printing on chars on the same line using system.out.println

    i have the following string:
    String msg = "This is a message brought to you by one and the only";
    msg.toCharArray(); //converted to a char array.
    i've written a loop which goes through each of the char elements
    and puts it in it's own array:
    int i = 0;             
    while (i < msg.length)
                    char[] test = {msg};
    System.out.println(test);
    the problem is system out println prints out each of the elements on seperate lines is
    it possible to have them in one line to reform the original string?

    No exactly sure what you are trying to do. Does this
    help?
    String msg = "This is a message brought to you by one
    and the only";
    char[] test = msg.toCharArray();
    System.out.println(test);
    not really because i want to convert the string to a char array and then reform it in another char array and then i can choose which elements i want included and not to be so that it can be printed on the same line. I can do it the following way:
    char[] test = {test[0], test[1]]};
    but say i want all the letters containing the chracter T (and again i can use the above solution and select the elements from the string but i don't want to hardcode it, say the string changes etc) in the test array so then i thought of writing a loop:
    while (test[i] == 'T')
    char[] test2 = {test[i]};
    System.out.println(test);
    i++;
    but it puts each T in a new line...

Maybe you are looking for

  • Data Model Design

    Hi Experts, In Current project I need to design data model and create data flow strategy for SD,MM,PP,FI modules from R/3.The client wants to use BOBJ on top of BI Info cubes/Reports.Based on KPI's given I need to do Data availability in R/3,Data ext

  • Form with logo

    hii, 1. provide me a form with logo so tht i can test in IDES. regards rahul Title was edited by:         Alvaro Tejada Galindo

  • SRM7.0, ext.classic - Which function is used to create PO in SRM?

    Hello, does someone of you know, which function will be used to create a PO in SRM out of a SC in an extended classic scenario? How can the creation of the SRM PO be debugged? Kind regards, Thomas

  • Is it possible to make a preset that makes it crop all my images to 5x7 instead of camera crop?

    All my templates for printing are made for 5x7 crops.  So my cameras are all 4x6 crops and I want to import my images and have LR crop to 5x7. I've tried to save a 'preset' to save 5x7 but it doesn't save that crop?  I can save everything else except

  • No luck to start solaris help please?

    hi, i wiped my hard disk twice, and installed the solaris 10 11/06 x86 six times but still problem, i installed the solaris in the first partiton of the primary IDE master, the partition is bootable, the installation process compleled with final inst