I need help in two small questions

Hi,
I'm new to Java and this is my first contribution.
I have some small questions and hope that I get their answers
*1. How can I read the input from the keyboard directly, without waiting to press Enter-key? (In DOS-console and not in graphic interface application)?*
*2. How can I write a Java code to print in a printer?*
With my best regards in advance

Hello and welcome to this forum. One request, could you please turn down the volume? All-bold is a bit much. Why not reserve it for when you really need it?
1. How can I read the input from the keyboard directly, without waiting to press Enter-key? (In DOS-console and not in graphic interface application)?Not without great difficulty. There are non-standard libraries out in the great aether that will allow this, but I believe that most of us mere mortals will use a GUI such as Swing when we want this type of functionality.
2. How can I write a Java code to print in a printer?Have you looked on Google or the Sun tutorials? It would be best if you start there and then come back here if you have any specific questions about something that's not working.
Good luck.

Similar Messages

  • Need help with a small application

    Hi all, I please need help with a small application that I need to do for a homework assignment.
    Here is what I need to do:
    "Write an application that creates a frame with one button.
    Every time the button is clicked, the button must be changed
    to a random color."
    I already coded a part of the application, but I don't know what to do further.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ColourButton extends JFrame {
         JButton button = new JButton("Change Colour");
         public ColourButton() {
              super ("Colour Button");
              setSize(250, 150);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panel = new JPanel();
              panel.add(button);
              add(panel);
              setVisible(true);
         public static void main(String[] args) {
              ColourButton cb = new ColourButton();
    }The thing is I'm not sure what Event Listener I have to implement and use as well as how to get the button to change to a random color everytime the button is clicked.
    Can anyone please help me with this.
    Thanks.

    The listener:
    Read this: [http://java.sun.com/docs/books/tutorial/uiswing/components/button.html]
    The random color:
    [Google this|http://www.google.com/search?q=color+random+java]

  • HT5699 The country I am living in is not on the Apple Contact Support list and I need help with my security questions.

    I am currently living in Tunisia but it's not on the Apple Contact Support list. I need help with my security questions which I cannot remember the answers. There is no link to send a reset email. What do I do?

    Click here and ask the iTunes Store staff for assistance.
    (114040)

  • I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set

    I need help resetting my security questions, i try to and it says email sent but i never get the email to my main email or alternate email, i never set my questions but somehow there set, so i can also not buy apps without entering my question awnsers please help

    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    https://expresslane.apple.com
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    or
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    http://support.apple.com/kb/HE57
    or           
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions

  • HT5312 i need help with the security questions is there some way to get you to remind me what they were from e-mail or other wise

    I need help with the security Questions is there some way to get you to remember them by e-mail of other wise

    Read the HT5312 page that you posted from, it has instructions for how to reset them i.e. if you have a rescue email address set up on your account then steps 1 to 5 half-way down that page should give you a reset link.
    If you don't have a rescue email address then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • I need help reseting y secerty questions

    i need help reseting my secerty questions

    1)  Apple ID: All about Apple ID security questions
    If necessary
    2)  See Here... ask to speak with the Account Security Team...
    Apple ID: Contacting Apple for help with Apple ID account security
    3)  Or Email Here  >  Apple  Support  iTunes Store  Contact

  • HT1918 i need help answering my security questions

    I need help answering my security questions

    Welcome to the Apple Community.
    Start here, and reset your security questions, you will receive an email to your rescue address, use the link in the email and reset your security questions.
    If that doesn't help or you don't have a rescue address, you might try contacting Apple through iTunes Store Support

  • Need help!! HDV question

    Hey guys..
    I shot a project in HDV 108060i 16:9 project
    brought the footage into FCPro natively..
    when its time to export my project can i give them a downconverted dv 4:3 copy with sides cropped?? and a hdv 16:9 copy?
    the only reason i want to do that is to make myself look better as i am a youngster trying to impress many people as i can.

    you should ask them what they want but you should test both procedures beforehand so you're not scrambling to figure it out before a deadline, as many folks come shouting here do and here's an example post - severe sarcasm to follow - "OMG, I NEED HELP ASAP AS I'M ON A DEADLINE AND I HAVE TO EXPORT THESE FILES AND I CAN'T EVEN TURN MY COMPUTER ON AND MY CLIENTS WILL BE HERE TOOT-SWEET SO HELP ME NOW!!!! I JUST KNOW NO ONE ELSE HAS EVER FACED THIS PROBLEM BEFORE!"
    if you want to impress someone, don't ever assume anything or leave anything to chance. above all, always be on time or early and never assume your clients don't care or don't know.

  • REALLY need help about two accounts, 1 Mac

    I really really need help.
    Back ground. I have a bought my daughter an itouch 4th gen for Christmas. I have set up a new user account on the macbook pro, Set her up a new Apple ID, but I want to share the music. So i did what was said, moved the media folder to a shared folder.
    Got the music shared onto her itunes libary, although when I added to Library it transfered all my apps, which I deleted.
    I did a trial run of downloading an app, and its not showing in the library? WHY??
    Please can someone help me before it goes out the window.
    Thanks

    If you want a true streaming server, you'll need to be running software such as QuickTime Streaming Server. QTSS only comes with Mac OS X Server, but there is an open-source version called Darwin Streaming Server available for Mac OS X, Linux, and Windows 2000/2003 Server.
    To get started learning how to stream your content, start with the Streaming & Delivery tutorials on this web page.
    Hope this helps.

  • I have originally been able to purchase apple apps and In game app and all of apple products but I got the iOS 7 update and i need to enter two security questions and I can't recall ever knowing about them and I cant buy things now can someone please help

    Please help would be appreciated :)

    Did yo call APple/iTunes as Ana said?
    From a Kappy  post
    The Best Alternatives for Security Questions and Rescue Mail
    1.  Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
    2.  Call Apple Support in your country: Customer Service: Contact Apple support.
    3.  Rescue email address and how to reset Apple ID security questions.
    An alternative to using the security questions is to use 2-step verification:
    Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID.

  • I need help resetting my sucurity questions?

    I got a iTunes gift card, put it in my account and tried to buy something with it but it said that I needed to put in my sucurity questions, only problem is I made my apple account two years ago and I don't remember my security question answers. When tried resetting my questions it said I had to put my old answers in first. If I remembered my old security answers then there'd be no reason to reset them now would there. Now I'm just ******. I really want to buy my music and be on my way. Can someone help me please!?

    Go to https://expresslane.apple.com
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.

  • Need help for two thing:: JFace/SWT and Drawing an updating graph! plz help

    Hey all,
    This is my first post on this forum and I was wondering if you guys can help me with two problems that im currently having and I would be really grateful.
    1. When ever i try to use the SWT/JFace tools and run it as a java app. I get this error:
    java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
    Exception in thread "main"
    any suggestions??
    2. Now this is my main question:: How should I go about programming a graph that updates based on numbers in an array? Basically set of numbers in an array ( unsorted ), and as it is getting sorted I want a graph displaying how it is getting sorted. The graph is just a basic XY chart.
    Thank you.

        @n2medallas,
    Let's get your phone working right!
    You mentioned your getting a message that the phone is rooted. Where are you seeing this message? What is the current bilud and software version on your phone? Have you taken the phone into a VZW store to check the message you are seeing?
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • Need Help with a Java Question Plz

    Hi
    Could someone help me out with this please?
    I need to know the difference between the two String methods equals and equalsIgnoreCase
    Thanks

    The former tests if the Strings are equal, the latter tests if they're equal, but ignores case...
    I.e. "A".equalsIgnoreCase("a") returns true, among other things...

  • I need help changing my security questions and dont know the answers to the ones i already have set

    i made my account like 4 years ago and have tried every possible answer to my questions i can think of but everytime it says one or both of them is wrong.  i tried changing them but there isnt a button that i can click to change them as far as i have seen it just keeps asking me to answer them.  i need to change them so i can buy songs on my new laptop please help.

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (103373)

  • Need Help on one Firewall Question

    Hi All,
    I am using cisco asa in my environment and which is connected to l2. One server and one router is also connected to L2. Now i want to access port 80 on my server from outside.
    How its possible if the server gateway is routers ip and i don't want to add static route in router or server towards the firewall. Nat and access List is done on firewall. what else i can do on firewall to access port 80 of my server from outside. Dont want to change anything on router/server.
    Below is the IP detail
    1. Firewall inside 192.168.1.1 & Outside 1.1.1.1
    2. Router IP - 192.168.1.2
    3. Server IP - 192.168.1.3 & GW - 192.168.1.2

    Hi,
    Well the only ways I could think that the connections could be gotten working would be
    Policy Based Routing on the Router that would forward the web servers traffic through the firewall instead of the routers default gateway (even just the return traffic for web connections)
    Configuring NAT on the ASA firewall so that all traffic from the Internet would be NATed to an internal IP address from the network 192.168.1.0/24. This would mean that the server would be sending the traffic to ASA instead of using its default gateway. And this is ofcourse because the server would be seeing all connections coming from its connected network and wouldnt have to use the default gateway.
    You havent mentioned what type of NAT you are doing on the ASA for the server Static PAT or Static NAT. Static PAT would be forwarding a single (or several ports) only while Static NAT would be dedicating a single public IP address for the server.
    I would imagine that you would have to configure 2 separate NAT statements
    Dynamic Policy PAT for the External hosts
    This should NAT all traffic coming from the Internet to the IP address of your ASAs "inside" interface WHEN the destination is the public IP address of your Web server.
    access-list POLICY-NAT-WEBSERVER remark NAT inbound web traffic to an internal IP address
    access-list POLICY-NAT-WEBSERVER permit tcp any host 1.1.1.1 eq 80
    nat (outside) 100 access-list POLICY-NAT-WEBSERVER
    global (inside) 100 interface
    Static NAT or Static PAT for Web server
    Either of these NAT configurations should forward the connections to your Web servers public IP address on port TCP/80 to the Web server.
    Together with the above NAT configuration the return traffic from the Web server should flow back through the ASA.
    static (inside,outside) 1.1.1.1 192.168.1.3 netmask 255.255.255.255
    or
    static (inside,outside) tcp 1.1.1.1 80 192.168.1.3 80 netmask 255.255.255.255
    If you are using the public IP address on the ASA "outside" interface then replace the 1.1.1.1 with "interface". The IP address 1.1.1.1 stands for a public IP address that you might use.
    Hope this helps
    Please do remember to mark a reply as the correct answer if it answered your question.
    Feel free to ask more if needed
    - Jouni

Maybe you are looking for

  • Oracle 11g - Listen for remote connections

    Hi all, I recently installed Oracle 11.1.0.7.0 on a Windows Server 2008 standard server 6.0 service pack 2. Everything is working as it should. I can open the database control web page on the local computer. I can connect locally to the database from

  • Questions about Database roles

    Hi,  Need to setup a new (Windows) user which has varied access to tables, views and procedures in about 8 different schemas all in the same database.  I've created a instance level login and then gone to the database to set the more granular details

  • Problem with unwanted endless loop while reading a file

    Hi everyone, i got stuck with a class, that reads all words out of an input file, counts each file's frequency and prints out a list with words and frequency. Everything works fine as long as i use a In.read() method included in a example class provi

  • Incredibly frustrated with service - hope Customer Service is monitoring this forum

    Our internet modem needs to be rebooted continually.  We spent hours on the phone with Verizon a couple of months ago, and they said they were sending new filters for our land line.  They never arrived.  I don't think that is the problem anyway, sinc

  • Match Colors (Picture Styles) for D7100

    Hello Everyone, i am fairly new to Aperture and developing RAW Files. I´m currently testing out different RAW Converters and are between chairs on Lightroom and Aperture. This far i like the workflow and handling of Aperture much better despite on th