I need HELP!! Hope can Get Help!!

below is the program that i did...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MultipleWindows extends JFrame{
private JTextField jtfMessage_1 = new JTextField("");
private JTextField jtfMessage_2 = new JTextField("");
private JButton jbtContinue = new JButton("Continue");
private JLabel jlbl_1 = new JLabel("Enter number of lines");
     private JLabel jlbl_2 = new JLabel("Enter number of characters per lines");
private MemoSaver ms = new MemoSaver();
private JFrame msFrame = new JFrame();
int Lines2 ;//= Integer.parseInt(jtfMessage_1.getText());
     int Characters2;// = Integer.parseInt(jtfMessage_2.getText());
public MultipleWindows() {
setLayout(new GridLayout(3,2,5,5));
add(jlbl_1);
add(jtfMessage_1);
add(jlbl_2);
add(jtfMessage_2);
add(jbtContinue);
jbtContinue.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object src = e.getSource();
if(src == jbtContinue){
setVisible(false);
Lines2 = Integer.parseInt(jtfMessage_1.getText());
     Characters2 = Integer.parseInt(jtfMessage_2.getText());
     ms.show();
public static void main(String [] args){
JFrame frame = new MultipleWindows ();
frame.setTitle("Test Message Panel");
frame.setSize(450,125);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private class MemoSaver extends JFrame implements ActionListener{
public static final int WIDTH = 600;
public static final int HEIGHT = 300;
private JTextArea theText = new JTextArea("Text Area",Lines2,Characters2);
private String memo1 = "No Memo 1.";
private String memo2 = "No Memo 2.";
public MemoSaver(){
setSize(WIDTH, HEIGHT);
setTitle("Memo Saver");
setLocationRelativeTo(null);
Container contentPane = getContentPane( );
contentPane.setLayout(new BorderLayout( ));
JPanel buttonPanel = new JPanel( );
buttonPanel.setBackground(Color.WHITE);
buttonPanel.setLayout(new GridLayout(2,3,0,0));
JButton memo1Button = new JButton("Save Memo 1");
memo1Button.addActionListener(this);
buttonPanel.add(memo1Button);
JButton memo2Button = new JButton("Save Memo 2");
memo2Button.addActionListener(this);
buttonPanel.add(memo2Button);
JButton clearButton = new JButton("Clear");
clearButton.addActionListener(this);
buttonPanel.add(clearButton);
JButton get1Button = new JButton("Get Memo 1");
get1Button.addActionListener(this);
buttonPanel.add(get1Button);
JButton get2Button = new JButton("Get Memo 2");
get2Button.addActionListener(this);
buttonPanel.add(get2Button);
JButton exitButton = new JButton("Exit");
exitButton.addActionListener(this);
buttonPanel.add(exitButton);
contentPane.add(buttonPanel, BorderLayout.SOUTH);
JPanel textPanel = new JPanel( );
textPanel.setBackground(Color.BLUE);
theText.setBackground(Color.WHITE);
theText.setLineWrap(true);
//theText.setWrapStyleWord(true);
textPanel.add(theText);
contentPane.add(textPanel, BorderLayout.CENTER);
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand( );
if (actionCommand.equals("Save Memo 1")){
memo1 = theText.getText();
theText.setText("Memo 1 saved");
else if (actionCommand.equals("Save Memo 2")){
memo2 = theText.getText( );
theText.setText("Memo 2 saved");
else if (actionCommand.equals("Clear"))
theText.setText("");
else if (actionCommand.equals("Get Memo 1"))
theText.setText(memo1);
else if (actionCommand.equals("Get Memo 2"))
theText.setText(memo2);
else if (actionCommand.equals("Exit"))
System.exit(0);
else
theText.setText("Error in memo interface");
p/s: now my problem is...when i key in the number of lines and number of characters in the 1st window, i need this data to be the number od rows and columns of the text area in the 2nd window....but it doesn't work..... can anyone please help me?~ thanks!

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MultipleWindows extends JFrame{
//HERE IS WHERE I NEED TO KEY IN THE NUMBER OF LINES AND NUMBER OF CHARACTERS
private JTextField jtfMessage_1 = new JTextField("");
private JTextField jtfMessage_2 = new JTextField("");
private JButton jbtContinue = new JButton("Continue");
private JLabel jlbl_1 = new JLabel("Enter number of lines");
private JLabel jlbl_2 = new JLabel("Enter number of characters per lines");
private MemoSaver ms = new MemoSaver();
private JFrame msFrame = new JFrame();
// HERE I DECLARE THE VARIABLE OF THE LINES AND COLUMS
int Lines2 ;
int Characters2;
public MultipleWindows() {
setLayout(new GridLayout(3,2,5,5));
add(jlbl_1);
add(jtfMessage_1);
add(jlbl_2);
add(jtfMessage_2);
add(jbtContinue);
jbtContinue.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Object src = e.getSource();
if(src == jbtContinue){
setVisible(false);
//HERE I CHANGE THE TEXT IN THE TEXT FIELD TAHT KEY IN BY USER INTO INTEGER
Lines2 = Integer.parseInt(jtfMessage_1.getText());
Characters2 = Integer.parseInt(jtfMessage_2.getText());
     ms.show();
public static void main(String [] args){
JFrame frame = new MultipleWindows ();
frame.setTitle("Test Message Panel");
frame.setSize(450,125);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
private class MemoSaver extends JFrame implements ActionListener{
public static final int WIDTH = 600;
public static final int HEIGHT = 300;
//HERE I USE THE DATA KEY IN TO CREATE A TEXT AREA WHICH HAVE LINES AND COLUMNS THAT USER HAD KEY IN
private JTextArea theText = new JTextArea("Text Area",Lines2,Characters2);
private String memo1 = "No Memo 1.";
private String memo2 = "No Memo 2.";
public MemoSaver(){
setSize(WIDTH, HEIGHT);
setTitle("Memo Saver");
setLocationRelativeTo(null);
Container contentPane = getContentPane( );
contentPane.setLayout(new BorderLayout( ));
JPanel buttonPanel = new JPanel( );
buttonPanel.setBackground(Color.WHITE);
buttonPanel.setLayout(new GridLayout(2,3,0,0));
JButton memo1Button = new JButton("Save Memo 1");
memo1Button.addActionListener(this);
buttonPanel.add(memo1Button);
JButton memo2Button = new JButton("Save Memo 2");
memo2Button.addActionListener(this);
buttonPanel.add(memo2Button);
JButton clearButton = new JButton("Clear");
clearButton.addActionListener(this);
buttonPanel.add(clearButton);
JButton get1Button = new JButton("Get Memo 1");
get1Button.addActionListener(this);
buttonPanel.add(get1Button);
JButton get2Button = new JButton("Get Memo 2");
get2Button.addActionListener(this);
buttonPanel.add(get2Button);
JButton exitButton = new JButton("Exit");
exitButton.addActionListener(this);
buttonPanel.add(exitButton);
contentPane.add(buttonPanel, BorderLayout.SOUTH);
JPanel textPanel = new JPanel( );
textPanel.setBackground(Color.BLUE);
theText.setBackground(Color.WHITE);
theText.setLineWrap(true);
//theText.setWrapStyleWord(true);
textPanel.add(theText);
contentPane.add(textPanel, BorderLayout.CENTER);
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand( );
if (actionCommand.equals("Save Memo 1")){
memo1 = theText.getText();
theText.setText("Memo 1 saved");
else if (actionCommand.equals("Save Memo 2")){
memo2 = theText.getText( );
theText.setText("Memo 2 saved");
else if (actionCommand.equals("Clear"))
theText.setText("");
else if (actionCommand.equals("Get Memo 1"))
theText.setText(memo1);
else if (actionCommand.equals("Get Memo 2"))
theText.setText(memo2);
else if (actionCommand.equals("Exit"))
System.exit(0);
else
theText.setText("Error in memo interface");
P/S: i have use capital letters to write the problem i try to solve...Hope u can help! thanks~

Similar Messages

  • Someone gave me a airport express router. it works great with my macbook but when i try to connect to my iphone it says it can't be set up by "this software". Where can I download whatever software my iphone needs so I can get wifi?

    Someone gave me a airport express router. it works great with my macbook but when i try to connect via wifi to my iphone it says it can't be set up by "this software". Where can I download whatever software my iphone needs so I can get wifi?

    Per chance is your AirPort Express Base Station (AX) an 802.11g model? If so, that is why you are getting this error message from the AirPort Utility running on the iPad. You would need to use either version 5.6 or 5.6.1 running on a Mac or a PC to administer this base station.

  • Loemu PKGBUILD, need help with python dependencies [solved]

    I'm having a hard time determining the depends for this python application. It uses gtk and glade, but namcap is unable to determine dependencies for python apps, I think. It complains that I am including not needed depends. I found a requirements list here:
    http://linux.softpedia.com/get/Utilitie … 4855.shtml
    that might give some clues, but I'm still struggling to determine what's needed until I can get home and run the application.
    My PKGBUILD in case you're interested and think you can help. I'm sure I need glade for python in the depends line, but I can't find it in AUR or with pacman.
    # Contributor: robb_force <[email protected]>
    pkgname=loemu
    pkgver=0.1.1
    pkgrel=1
    pkgdesc="A simple frontend for various game emulators, including XMAME, SDLMAME and Snes9x."
    url="http://loemu.pegueroles.com/"
    license="GPL"
    arch=('i686')
    depends=('pygtk>=2.6' 'libglade')
    makedepends=('python>=2.4.0')
    source=(http://loemu.pegueroles.com/dists/${pkgname}-${pkgver}.tar.gz)
    md5sums=('d4cff1ef835ce19a9fd22cdaec47074a')
    build() {
    # Fix the paths in the scripts
    cd ${startdir}/src/${pkgname}-${pkgver}
    sed '/roms/d;/flyers/d;/snaps/d' -i setup.py
    sed 's|share/games|share|g' -i setup.py
    cd ${startdir}/src/${pkgname}-${pkgver}/${pkgname}
    sed 's|share/games|share|g' -i Preferences.py
    sed 's|share/games|share|g' -i Loemu.py
    sed 's|share/games|share|g' -i Config.py
    # Install the application
    cd ${startdir}/src/${pkgname}-${pkgver}
    python setup.py install --prefix=${startdir}/pkg/usr
    Last edited by robb_force (2007-05-18 19:22:02)

    Thanks for the response. I've added the working PKGBUILD to the AUR.
    http://aur.archlinux.org/packages.php?d … 1&ID=11093

  • Hey guys, i need HELP !!!My iphone 6 just gave stolen .... But i hope that can take all the photo back... Total is almost 3000 pc ... But my icloud storage just 5gb only ... If there have any ways to let me get back those photo ? Those photo really m

    Hey guys, i need HELP !!!My iphone 6 just gave stolen .... But i hope that can take all the photo back... Total is almost 3000 pc ... But my icloud storage just 5gb only ... If there have any ways to let me get back those photo ? Those photo really mean a lot to me .... Have alot of memory with family ... It's very meaningful !!! Please kindly help me !!! Thanks           

    Please please help me, if you know how.

  • I get error 0x80073cf9 now and I need help to FIX Windows Store can't update any Apps & can't install any Apps now?

    Hi I hope some one can tell me step by step how to fix windows 8.1, I can't update any of my Apps and can't install any new apps now and I get error code 0x80073cf9?  But my problem is different than most of the other FIXES I read about, because nothing
    fixes my problem to be able to install new Apps and get app updates and stop getting that error code?
    I keep getting same error code 0x80073cf9 after I try any of the FIXES I have read about and tried all  the fixes on  my Lenovo Z580 laptop, that came with windows 8 and updated to 8.1.  And ever since I bought this laptop I could
    always install and update all my apps for the last year when I had Win 8 and Win 8.1 now.   This has been going on since April and May and its driving me crazy!    And from the May updates I did get all the updates and
    I also installed the KB update  that said I need this KB to get all updates in the future.  
    But all the other people when they get this error code they could not even open and use any of their Apps already installed.  And they also get the error code when they try to update or get a new apps.   
    But I can click on any APP installed already and use all my Apps with no problems.     I have read so many how to fix this error code but nothing works! :-(      I have tried a lot of 
    the fixes on Microsoft forums that says do this and the fix will get rid of the error code but I keep getting the same error code after I try that  fixes.    And I have read a lot of other windows 8 an windows 8.1  web sites when
    I search for how to fix this error code?   And tried all of the fixes that were different from the Microsoft forum fixes. But after I try those fixes I still can't install any apps or can't get my app updates? 
    Please to any person's who can help me by giving me  more that 1 fix, because I have tried so many fixes, If you know more that 1 fix tell me how to do your fix step by step so I can understand what you say to do to fix my windows store? 
    Thanks for any and all help?  And if I don't get any help in this section of the forum I will try to put this in a different area, if I don't get any help at this section of the forum I will try to ask this in another part of he forum ok?   
    I really need HELP with this so I can get my laptop working again to install new apps and get the updates to my apps? 

    Fixed the problem by going to settings/store and logging out with apple ID.  Then logged back in with password and updates, apps, and iTunes store seem to work ok now.

  • If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    Hello,
    As frustrating as it seems, your best to post any frustrations about the iPhone in the  iPhone discussion here:
    https://discussions.apple.com/community/iphone/using_iphone
    As this discussion is for iBook laptops.
    Best of Luck.

  • I need help with ISIGHT!  I can't get it to work with MSN!

    HI,
    My issue is this... I have AIM/AOL and I am able to see myself on webcam.. however noone else can unless they HAVE a webcam... My first question is- "DO you have to have a WEBCAM on both ends for both people to see you?" Does the person I am chatting with HAVE to have a webcam to see me? If so WHY? They should atleast be able to see ME if I want them to... Also if they are using windows for PC platform... can they use a pc webcam and still connect with me through my isight although I am on a mac?
    My second major ISSUE is.. WHY is the isight only compatible with AOL/AIM? I was told when I bought this it would be compatible with MSN Messenger for windows AND the MAC version... I have both and the isight does not show up on it... CAN ISIGHT be connected to msn messenger for MAC??? PLEASE help me!
    I called APPLE tech support and they couldn't even help me! They told me to call Microsoft! Anyhow- one guy did say he was able to get his ISIGHT working with the MSN messenger for MAC platform.. do you have ANY idea how to do that?? The thing is ALL my freinds are on PC's and have MSN messenger..
    ALSO- someone on mac rumors told me to look for a guy names RALPH! Said you know A LOT about mac and pc compatibility! PLEASE HELP
    Bottom line - I want to use isight with msn so my msn pc friends can share webcam... I also have virtual pc software... is it easier to just get a pc webcam and do it through there? ( i tried that and it didn't work either) i need major TECH SUPPORT!
    THANK YOU

    Microsoft's Messenger for Mac (MSN) does not support webcams at all.
    I have found the best alternative to MSN to be aMSN with macam for the webcam driver (it is a cheap usb webcam). Both are free open source projects. I guess if you use an iSight you will not need macam.
    aMSN can be found here: http://amsn.sourceforge.net/
    macam can be found here: http://webcam-osx.sourceforge.net/
    The speed is substantially faster and it is far more stable than Mercury in my experience.
    The only difficulty is the camera is often shown as being "in use by another application". To counter this I start macam, then plug in the camera (or unplug and plug back in). Then I start aMSN.

  • Hi everybody.. i have a problem nad i need help a.s.a.p ... i forgut my ipad passcode and tryed to remember it tell it locked and i cant get open .. it says connect to itunes .. i did that and its still not opening? what can i do? thanks

    hi everybody.. i have a problem nad i need help a.s.a.p ... i forgut my ipad passcode and tryed to remember it tell it locked and i cant get open .. it says connect to itunes .. i did that and its still not opening? what can i do? thanks

    http://support.apple.com/kb/HT1808
    Regards.

  • Need help big time. I need to change my apple ID but the original email address I set it up under is no longer used so i can't get my proper password sent to me. I don't want to set up a new account and lose all my old apps I have purchased.

    need help.  Before I set up my I-pad i need to regain access to my I-Tunes account, easy enough. The problem is I cannot re-set password.  I have tried to re-set and send to my designated email but it does not work. How can i get someone from Apple on the phone to help?

    Have you forgotten your password? - if so, you have a problem if the email address has gone dead.
    If you know your password, go to the iTunes Store, click on Account. log in and you can change the associated email address.
    If you don't know your password, and have no email address, you are going to have problems because it's difficult to see how Apple are going to identify you as the authorised owner of the account. Contact iTunes Support: go to http://www.apple.com/support/itunes/ - click on 'Other iTunes Store Features' in the list and then on 'Podcasts'. You will see a link to either 'Express Lane', which will guide you eventually to some contact options, or you may see a link to email them.

  • My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    My daughter has spitefully changed my password and has refused to tell me. I have so much medical information that I can not lose. Is there anyway to get around this problem. Please I need Help fast.

    Connect the iPod to your syncing computer and restore it via iTunes.  However, if iTunes asks for the unknown passcode you need to place the iPod in recovery mode and then restore the iPod from backup.  For recovey mode see:
    iPhone and iPod touch: Unable to update or restore
    "If you cannot remember the passcode, you will need to restore your device using the computer with which you last synced it. This allows you to reset your passcode and resync the data from the device (or restore from a backup). If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present. Refer to Updating and restoring iPhone and iPod touch software."
    Above is from:
    http://support.apple.com/kb/ht1212

  • Need help!!!!!! I've forgotten my security questions. My rescue address is not available anymore. So I can't get the instructions to reset my security questions. Please send me this instructions

    Need help!!!!!! I’ve forgotten my security questions. My rescue address is not available anymore. So I can’t get the instructions to reset my security questions.
    <E-mail Edited by Host>

    Contact the Apple account security team for your country for help changing your security questions: Apple ID: Contacting Apple for help with Apple ID account security.

  • I hope someone gets this who can help me. i don't find anything helpful in the help section of icloud. i'm using my 4th generation itouch for about 3 weeks with the ical. but today when i tried to edit an event or d an event a window would pop up and sa

    i hope someone gets this who can help me. i don't find anything helpful in the help section of icloud. i'm using my 4th generation itouch for about 3 weeks with the ical. but today when i tried to edit an event or add an event a window would pop up and say "event can't be saved" or "no calendar chosen" or something like "this event doesn't belong with this calendar" and stuff like that.
    can you please help me fix this?

    You could repartition your drive to have a different OS X with the older iTunes there, and the newer iTunes on the existing partition. Back up everything beforehand. See Kappy's advice in this thread. Partitioning my Hard Drive

  • My iPod touch 4 generation 32gb sometimes is really slow and when ever I get on a app it will shut it down. My lock botton is broken and I use the accesery botton to lock it. That being said I can't power down my iPod. I need help, I don't know what to do

    My iPod touch 4 generation 32gb sometimes is really slow.When ever my iPod is being slow and I get on an app the app will shut down. My lock botton is broken and I use the accesery botton to lock it. That being said I can't power down my iPod. I need help, I don't know what to do! Could you tell me how I can power down my iPod or how I can fix the slowness and the shutting down of the apps.

    - Periodically double click the home button and close all the apps in the recently used dock. Then power off and then back on the iPod. This frees up memory. The 4G only has 256 MB of memory.
    - Next, reset the iPod
    To reset the iPod without the hardware buttons,
      Reset network settings: Settings>General>Reset>Reset Network Settings. All your wifi and bluetooth preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected. You will have to rejoin wifi networks and repair BT devices
    Then you can try:
    - Restore from backup. See:                                                
    iOS: How to back up                                                                                     
      - Restore to factory settings/new iOS device.

  • I need any help i can get, im having trouble with the app find my iphone. I have lost my iphone, checked on the computer, and somehow, took it away so how do i get it back??

    Help
    I need any help i can get, im having trouble with the app find my iphone. I have lost my iphone, checked on the computer, and somehow, took it away so how do i get it back??

    If you are saying that after signing into iCloud it is telling you device is not found, it could be for any number of reasons. If the battery is dead, if the SIM has been removed, or if someone else has the phone and they have restored it, it will not be shown. Also, if you located it once and then sent a remote wipe, it disables the abililty to locate the phone with Find My iPhone.

  • Hi.I need help.my iphone was Stolen .how can I get back my iphone. Serial No.DX*****PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone

    Hi.I need help.my iphone was Stolen .how can I get back my iphone.  Serial No.DX******PMW.could you help me find my iphone.thank you very much.could you send me the ICCID number to help me find the iphone.if you can help me.
    <Personal Information Edited by Host>
                                                                                                                                                                   Sincerely a Chinese girl really need your help

    Sorry we are all users on this User  Community No Apple Staff
    Read this .
    http://support.apple.com/kb/HT2526
    Apple do not and cannot assist in finding stolen property ,that is the responsility of your Police

Maybe you are looking for

  • I can't get my HP laserjet p1102w to work with airprint

    Hi! So it seem's that I can't get my HP laserjet p1102w to work with airprint. I got it to send out it's own Wi-Fi signal, and i get in touch with that signal on my iPad 3. But when I wan't to print something out from Pages, then it says that it can'

  • DC's Broken in SAPPCUI_GP/ESS

    Hi All, I want to change DC pcui_gp/xssutils for which I have created seperate track for SC SAPPCUI_GP. On creation of the track i get 11 DCs broken. 3 Medata broken and 8 use dependencies broken. One of the build error is as mentioned below. INVALID

  • ME21N modification

    Hi experts, Please help me on this. I have modified me21n item overview table control with access key and added a field in table control, screen no. 1211. Added field is mepo1211-extwg (external material group). In the structure MEPO1211, I have adde

  • How to use  jdb.exe tool

    i've come across the JDB.EXE tool provided by the JRE in some books., but could not practically implement it. how can i use this tool in order to debug my programs. i tried this utility by typing "jdb" at the prompt and strat running the program usin

  • Help !! I lost my only admin account and I don't have the root

    Hello evrybody I bought a MacBook and I was very happy with it. But I played whith the netinfo and I changed my only admin account's short name then it turned into a standard account. I did not active the root account and I have the two CDs , but whe