Is there a full text mode in Java?

Hi everyone.
I'd like to write a java application for running exclusively on the command line. I know how to use system.out for printing basic texts, but i'd like to have a greater control over the output. I need just to clear the terminal window in wich i'm executing the application. I need too to position the cursor anywhere in the terminal window. Is this just possible in Java (a la old DOS programming) or must i pass through the the awt classes to do something alike?.
Thanks for your help.
Carlos.

hi,
no it is not possible, to set the cursor anywhere like in pascal, basic or c. You have to pass through awt, because java was developed as a web-language and so it isn't really useful to work on the command line. In my opinion and in the opinion of most other programmers system.out is just for test, debug or error-output and in this way, you should use it.
but there is one way to do what you want: rewrite the underlying native classes and libraries, which will be used when system.out is invoked.
regards

Similar Messages

  • Full text mode (iPhone)

    I was wondering if there is a way to set Pages to be full screen on the iPhone when typing a document instead of showing the full 8 1/2 document (scrolling left to right).  I'm sure there is a better way to describe this - but an example is with Google Drive and Docs (and even Microsofts Office for iOS) you can type a new document that fits perfectly on the iPhone screen (no scrolling left to right) with larger fonts. 
    Hopefully someone understands the question and can help. 

    hi,
    no it is not possible, to set the cursor anywhere like in pascal, basic or c. You have to pass through awt, because java was developed as a web-language and so it isn't really useful to work on the command line. In my opinion and in the opinion of most other programmers system.out is just for test, debug or error-output and in this way, you should use it.
    but there is one way to do what you want: rewrite the underlying native classes and libraries, which will be used when system.out is invoked.
    regards

  • Set full screen mode

    Hi everyone
    It may not seem a JMF problem but i am hoping for some help.
    I am just trying to implment full screen on jmf player panel, i tried but the nothing is shown but a black screen
    the following is the code of whole program:-
    import java.awt.*;
    import java.awt.Rectangle;
    import java.awt.Dimension;
    import java.awt.event.*;
    import javax.media.*;
    import javax.media.Player;
    public class MyPlayer extends Frame implements ControllerListener
         private Player player;
         private Panel panel;
         private String [] urls;
         int currentsong = 0;
         MediaLocator ml;
         int flag = 0;
         int videoWidth = 320, videoHeight = 200, controlHeight = 30;
         Dimension size;
         Component visual, control;
         private Dimension dimFrameSizeBeforeFullScreen = null;
         private Window windowFullScreen = null;
         public static void main(String[] args)
              String[] files = { "Khalid_Diana.mpg", "11.mpg", "Taha.mpg" };
              MyPlayer Medialist = new MyPlayer(files );
              Medialist.nextMedia(0);
         public void setFullScreen() {
              System.out.println("Full Screen");
              Dimension dimScreen;
              Dimension dimPrefSize = new Dimension(500,300);
              Rectangle rectVideo;
              panel = new Panel();
              panel.setLayout(new BorderLayout());
              //if (panel == null)
              //     return;
              dimScreen = Toolkit.getDefaultToolkit().getScreenSize();
              System.out.println("Screen Size: " + dimScreen.toString());
              if (windowFullScreen == null)
                   windowFullScreen = new Window(this);
                   windowFullScreen.setLayout(null);
                   windowFullScreen.setBackground(Color.black);
              windowFullScreen.setBounds(0, 0, dimScreen.width, dimScreen.height);
              rectVideo = new Rectangle(0, 0, dimScreen.width, dimScreen.height);
              if ((float)dimPrefSize.width / dimPrefSize.height >= (float)dimScreen.width / dimScreen.height){
                   rectVideo.height = (dimPrefSize.height * dimScreen.width) / dimPrefSize.width;
                   rectVideo.y = (dimScreen.height - rectVideo.height) / 2;
              else{
                   rectVideo.width = (dimPrefSize.width * dimScreen.height) / dimPrefSize.height;
                   rectVideo.x = (dimScreen.width - rectVideo.width) / 2;
              Toolkit.getDefaultToolkit().sync();
              windowFullScreen.add(panel);
              panel.setBounds(rectVideo);
              windowFullScreen.setVisible(true);
              windowFullScreen.validate();
         public MyPlayer(String[] files)
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        if (player!=null) player.close();
                        System.exit(0);
                   try{
                        Thread.sleep(2000);
                        setFullScreen();
                   }catch (Exception e){
              urls = files;
              //setTitle("Player");
              //panel.setBackground(Color.BLACK);
              //add(panel);
              //setLocation(300,250);
              //setSize(500, 500);
              //setResizable(false);
              //setVisible(true);
         public void nextMedia(){ nextMedia(0);}
         public void nextMedia(int index)
              try
                   ml = new MediaLocator("file:D:/Temp/" + urls[index]);
                   player = Manager.createPlayer(ml);
                   player.addControllerListener(this);
                   player.start();
              catch(Exception x) { x.printStackTrace(); }
         public void controllerUpdate(ControllerEvent ce)
              if (ce instanceof RealizeCompleteEvent)
                   visual=player.getVisualComponent();
                   if (visual !=null)
                      // size=visual.getPreferredSize();
                        //videoWidth=size.width;
                        //videoHeight=size.height;
                        panel.add( "Center", visual);
                   else {
                      // do nothing
                   if ((control=player.getControlPanelComponent())!=null)
                        //controlHeight=control.getPreferredSize().height;
                        //panel.add("South", control);
                   //setSize(videoWidth+10, videoHeight+controlHeight+30);
                   //validate();
                   //repaint();
              else if(ce instanceof EndOfMediaEvent) {
                   player.close();
                   player.deallocate();
                   panel.removeAll();
                   nextMedia(currentsong=(currentsong+1)% urls.length);
              //System.out.println("\n " + urls[currentsong] + " : " + ce.toString() );
              //else if ( ce instanceof FormatChangeEvent){}
    }Thanks in advance

    My problem is solved !
    Following is code of how to set full screen mode:-
    mport java.awt.*;
    //import java.awt.Rectangle;
    import java.awt.Dimension;
    import java.awt.event.*;
    import javax.media.*;
    import javax.media.Player;
    import javax.swing.*;
    public class MyPlayer extends JFrame implements ControllerListener
         private Player player;
         private Panel panel;
         private String [] urls;
         int currentsong = 0;
         MediaLocator ml;
         int flag = 0;
         int videoWidth = 1024, videoHeight = 768, controlHeight = 30;
         Dimension size;
         Component visual, control;
         private Dimension dimFrameSizeBeforeFullScreen = null;
         private Window windowFullScreen = null;
         Container content = getContentPane();
         public static void main(String[] args)
              String[] files = { "Khalid_Diana.mpg", "11.mpg", "Taha.mpg" };
              MyPlayer Medialist = new MyPlayer(files );
              Medialist.nextMedia(0);
         public MyPlayer(String[] files)
              setBackground(Color.BLACK);
              setUndecorated(true);
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              System.out.println("\n\n The Screen DIM: " + screenSize);
              content.setBounds(0, 0, screenSize.width, screenSize.height);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        if (player!=null) player.close();
                        System.exit(0);
              urls = files;
              setTitle("Player");
              panel = new Panel();
              panel.setLayout(new BorderLayout());
              panel.setBackground(Color.BLACK);
              add(panel);
              pack();
              //setLocation(300,250);
              setSize(1024, 768);
              //setResizable(false);
              setVisible(true);
         public void nextMedia(){ nextMedia(0);}
         public void nextMedia(int index)
              try
                   ml = new MediaLocator("file:D:/Temp/" + urls[index]);
                   player = Manager.createPlayer(ml);
                   player.addControllerListener(this);
                   player.start();
              catch(Exception x) { x.printStackTrace(); }
         public void controllerUpdate(ControllerEvent ce)
              if (ce instanceof RealizeCompleteEvent)
                   visual=player.getVisualComponent();
                   if (visual !=null)
                       size=visual.getPreferredSize();
                        videoWidth = size.width;
                        videoHeight = size.height;
                        panel.add(visual, BorderLayout.CENTER);
                   else {
                      // do nothing
                   if ((control=player.getControlPanelComponent())!=null)
                        //controlHeight=control.getPreferredSize().height;
                        //panel.add("South", control);
                   validate();
                   repaint();
              else if(ce instanceof EndOfMediaEvent) {
                   player.close();
                   player.deallocate();
                   panel.removeAll();
                   nextMedia(currentsong=(currentsong+1)% urls.length);
              //System.out.println("\n " + urls[currentsong] + " : " + ce.toString() );
              //else if ( ce instanceof FormatChangeEvent){}
    }By the way thanks Stefan for being supportive

  • I pressed something, and it made the browser go into a "full screen" mode, how do I change it back? And also, something happened and made my FireFox text on all internet pages smaller, is there any way I could change this setting?

    I had pressed a button on my keyboard which made my text and pictures and the whole page smaller in size, can I change that? And how could I change my browser out of "Full Screen" mode?

    You can press F10 to toggle (View) Full Screen mode.
    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

  • All that comes up when I open Firefox are my toolbars and a place to enter a URL, but there is no window. I have to enter full screen mode to view websites.

    Something happened with Firefox where all that comes up when I open Firefox are my toolbars and a place to enter a URL, but there is no window. I have to enter full screen mode to view websites. How do I get back to a regular browsing window? I have no idea how this even happened.

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Why is there a grey block on the bottom of my screen in safari and i cant see the top of my screen in full screen mode?

    When I put the window into full screen mode a gray block appears across the bottom of the screen. Thus the top of any given web page is truncated upward and I cannot access anything...But if I minimize the view what was once unavailable reappears.
    Is there a way to get rid of this gray block?

    Provide computer and OS version info and maybe we can help. Phone and iOS stuff tells us nothing useful.

  • In full screen mode (with "Hide Toolbars" selected), is there a way to make FF stop bumping the page up and down everytime I move the mouse to the top of the screen to reveal/hide the toolbar?

    In other words, is there a way to make FF behave like IE9 in full screen mode where the toolbar appears "over" the page rather than pushing the page down?

    Hello,
    Could you please elaborate what exactly you are referring to with "I can't get the link to diplay as a different colour"?
    Regarding your second query, I am afraid it is not possible using Adobe Muse. However it can be a very nice feature request.
    I would suggest you to post this as a feature request on our "Ideas for features in Adobe Muse" section of the forums : http://forums.adobe.com/community/muse/ideas
    Regards,
    Sachin

  • Highlight text in full screen mode

    Hi,
    Is it possible to use the highlight text and underline functions while I'm in full screen mode? It'd be really helpful.
    Thanks.

    The keyboard shortcut (U) for highlighting doesn't work when you switch to full screen Acrobat switches to the article reading tool. You do not seem to be able to switch to the select tool so you can highlight.

  • I can't exit full screen mode and there are no navigation areas like I used to have.

    I just loaded Foxfire 4.0. I tried out full screen mode and cannot get back to the original mode. Even more annoying is that there doesn't seem to be any way to open new tabs or show the items that I used to keep at the top of my start screen. It's annoying enough to have to learn a new version without having to start from scratch as it were. Why can't new versions let you keep some of the old familiar places from before??? I'm seriously considering trying to go back to my old version. HELP ME!!

    You could go back to the old version but it is relatively easy to make firefox 4 look and behave more like firefox 3.6, although there could be disadvantages in doing that. see [[Installing a previous version of Firefox]]
    Keyboard key '''F11 should toggle full screen on or off''' as before
    Touching the top edge of the screen with the mouse pointer should also display toolbars.
    The menubar and bookmarks toolbar do not display by default in firefox 4, if you are not using a Mac it will display the firefox button. Alt or f10 will temporarilly display the menubar toolbar, even if the firefox button is displayed, from the option
    * '''View -> toolbars -> [x] menu bar [x]bookmarks toolbar'''
    you may set the bars to display permenantly if you wish.
    Another change is the''' tabs on top''' again settable from the view menu or the firefox button. see [[why are tabs on top]]

  • Starting Java app in full-screen mode.

    Hi!
    How can I start a Java application in full screen mode?
    Thanks for help
    Stefan

    Did you mean Full Screen Exclusive Mode (so that you can do page flipping, etc...)?

  • I'm wondering is there any way to see what tool is selected in full screen mode?

    Question: Is there any way to see what tool is selected in professional full screen mode when tools and windows are hidden?
    Here's an example what i mean..i made a sketch
    So what i mean is for example you are in full screen mode, and you press "U" to activate Rectangle Tool >>> you see like pop-up or anything similar that shows you what tool is selected.
    Thank you!

    you need iPhoto v9.2 or Aperture 3.2 to view the stream on your Mac.

  • Everytime I go to full-screen mode the photo I am working on is on one space while the filmstrip is on another. Also there is no way to get to the menu on top as it is hidden. When I hit the f key everything goes to black and I have to quite the program.

    Everytime I go to full-screen mode the photo I am working on is on one space while the filmstrip is on another. Also there is no way to get to the menu on top as it is hidden. When I hit the f key everything goes to black and I have to quite the program. This is the first time I have any problems with Aperture.
    I run aperture 3 on OS X 10.7 iMac 27" 2.8GHz i7 16GB.
    Thanks for any help.

    You have to change the cursor focus.
    What I usually do for PDF pages/tabs, is click in the URL/location bar, then F11.<br />
    For Flash, if you click on the page outside of the video area/box, F11 should work.

  • Is there a way to select a document that contains a word not followed by a particular word in full text?

    I have a table named Documents that has Content field full text indexed
    Now i need to create a query in such a way that the query should return docs that have at least one word "hello" that does not have word "world" following it.
    --sth like
    select content from documents
    where contains(Content,N'hello(not followed by word "world")')
    And the result should be
    "hello" -- since this does not have world following hello in it"
    "hello friend and hello world" -- this document has word hello that is not followed by world it it"
    Can a full text query be formulated in a way to achieve above results? If so how?? I want to avoid parsing Content manually as much possible as I can.

    Hi Mokchhya,
    According to your description, the issue regards SQL Server Search, I will help you move the question on the related forums, and It is appropriate and more experts will assist you.
    In addition, I do a test. If you want to get the results which contains ‘hello’ characters and not contains’ world’ characters. I recommend you use NOT on any boolean expression. For example, if you create full test catalog and full test index. When you
    need to find the document records who has “hello” in their content, and does not have “ world” in content, CONTAINS( ) is takes one keyword to match with the records.
    select * from <database>.<schema>.<table>
    where contains (Name, 'hello') and not contains (Name, 'world')
    For more information, see:
    http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/
    if you don’t use full text search, you can use Like with wildcarding to scan a column. For example,
    ;With cte As
    (select * from <database>.<schema>.<table>
    Where name like ‘hello%’
    select * from cte
    where name not like ‘%world’
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Full Screen Text-Mode on a PC

    I bought a 23" and a 20" Apple Cinema Display. They are outstanding quality; but I don't seem to have a text mode, i.e., when the computer boots, I don't see anything until the gui appears on Windows XP and my FreeBSD boxes.
    Is this normal?

    Hi Bill,
    In my (admittedly limited) experience of PC, my guess would be that this may be due to the fact that these monitors need the graphics drivers to fire up within the OS in order to start functioning.
    When the PC is booting up through the DOS/Bios stage, these drivers have not as yet come on line, so no display will occur. I guess this would be a pain because it makes it difficult for you to F8 to go to the setup, diagnostic and "Safe" modes.
    Not sure how one would go about fixing this, though (sorry!)
    Cheers!
    Karl

  • "Full Screen Mode" in Adobe Reader XI for Windows 8 loads way too slow!

    I recently got a new laptop with Windows 8, after having used Windows Vista for years.  I installed Adobe Reader XI for my new computer.  Before, I used Adobe Reader X on Vista.  I used Adobe Reader "Full Screen Mode" to read the nice-looking Bible chapters I created with internet audio from Biblegateway.com.  In Vista, the "Full Screen Mode" appeared quickly, before the audio fully started, so I could see the text in time for the reading. 
    However, with Windows 8, "Full Screen Mode" takes around 5-10 seconds to appear at all, and a black screen is present throughout the wait.  It does the same thing when I hit "escape" to exit "Full Screen Mode" as well.  I even uninstalled Adobe Reader XI from my new laptop, and tried using Adobe Reader X, even though it is not recommened by Adobe to do that on Windows 8, in order to test the speed of "Full Screen Mode" there.  Adobe Reader X had the same problem!  I do not know if this can be fixed, but I am pretty unhappy about it!  I enjoyed the "Full Screen Mode" with my PDF chapters and the online bible audio!  Finding that function for the first time with Adobe Reader X was a delight for me!  It gave the reading a theater feel!
    Has anyone else here had a similiar problem with "Full Screen Mode" loading way too slow on Windows 8?  I am very disappointed!  If this cannot be fixed by a user, is there a place to complain to Adobe and make a recommendation for software improvement?  Thank you!             

    From: Test Screen Name [email protected]
    Sent: Sunday, August 04, 2013 11:32 AM
    To: gunner0490
    Subject: I'm not able to open PDF files in Adobe Reader XI.
    Re: I'm not able to open PDF files in Adobe Reader XI.
    created by Test Screen Name <http://forums.adobe.com/people/TestScreenName>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/5565198#5565198

Maybe you are looking for