Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,406 members, 7,822,860 topics. Date: Thursday, 09 May 2024 at 06:10 PM

Sbucareer's Posts

Nairaland Forum / Sbucareer's Profile / Sbucareer's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 38 pages)

Programming / Re: Java Server Pages (jsp) Or Java Server Face(jsf Which Path To Trend? ? ? ? by sbucareer(f): 11:41pm On Jul 11, 2008
[size=1pt]
Just want to share this piece of code with Java enthusiast. It is about Desktop programming. Mind you this code is not compiled or tested. It was typed directly onto the forum message editor. If it doesn't compile when you copy and paste it, you would need to debug it.



package Phone;

import javax.swing.UIManager;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.text.*;

public class MobilePhoneApplication extends JPanel{

  private JPanel mainPanel;
  private JPanel display;
  private JPanel keyPads;
  private JPanel keyControls;

  private JTextArea textArea;

  private JButton call;
  private JButton end;

  private ActionListener listener;
  private DocumentListener docuListen;
  private Document jDocument;


  public MobilePhoneApplication (ActionListener listener, DocumentListener docuListen){
 
     try{
            UIManager.setLookAndFeel
                ( UIManager.getSystemLookAndFeelClassName() );
        }catch(Exception e ){
        }//End try
    this.listener = listener;
    this.docuListen = docuListen;
   
    mainPanel = new JPanel();
    display   = new JPanel();
    keyPads   = keyPads();
    keyControls = new JPanel();
   
    keyControls.setLayout ( new FlowLayout( ) );
   
    call = new JButton( "Call"wink;
    end  = new JButton ( "End" );
    keyControls.add ( call );
    keyControls.add ( end );
   
    display.setLayout ( new GridLayout (1, 1));
    textArea = new JTextArea();
    textArea.setEditable ( false );
    textArea.getDocument().addDocumentListener (docuListen);
    textArea.setForeground ( new Color (255, 50 , 10 ));
    textArea.setFont ( new Font ("Dialog", Font.BOLD, 34 ));
    textArea.setLineWrap(true);
                               

    display.add ( textArea );
   
    mainPanel.setLayout( new GridLayout(3, 1) );
    mainPanel.add ( display );
    mainPanel.add ( keyControls );
    mainPanel.add ( keyPads );
   
    call.setActionCommand ( "Call" );
    end.setActionCommand ("End" );
    call.addActionListener (listener);
    end.addActionListener ( listener );

     this.add( mainPanel );

  }//End MobilePhoneApplication Constructor


   private JPanel keyPads (){
       String values[] = {"1", "ABC2", "DEF3",
                          "GHI4", "JKL5", "MNO6",
                          "PQRS7", "TUV8", "WXYZ9",
                          "*", "0+", "#"              };
       JPanel toReturn = new JPanel();
       toReturn.setLayout (new GridLayout(4, 3));
       JButton keys[] = new JButton[values.length];
       
       for ( int index1 = 0; index1 < keys.length; index1++ ){
              keys[index1] = new JButton ( values[index1] );
       }//End for

       for (int index = 0; index < values.length; index++){
              //keys[index].setText( values[index] );
              keys[index].setActionCommand(values[index]);
              keys[index].addActionListener(this.listener);

              toReturn.add(keys[index]);
        }//End for
       
         return toReturn;
                 
  }//End keyPads method
 
  public JTextArea getTextArea (){
    return textArea;
  }//End getTextArea
 
  public void show(String string ){
    if ( textArea.getText().length() != 9 ){
        textArea.setText( textArea.getText()+string );
    }
  }//End show
 
  public void defaultMenu ( boolean set){

        call.setEnabled ( set );
        end.setEnabled ( set );
  }//End defaultMenu
 
  //Test if the TextArea has any test
  public boolean hasChar(){
    jDocument = textArea.getDocument();
    return ( jDocument.getLength() != 0 );
  }//End hasChar
 
  public void clear (){
    String text = textArea.getText();
    text = null;
    textArea.setText (text );
  }//End clear
}//End MobilePhoneApplication




I am continually updating this code
[/size]
Programming / Re: Sudoku Puzzle by sbucareer(f): 7:52am On Jul 09, 2008


Welcome
[flash=425,344]http://sudoku.math.com" type=application/x-shockwave-flash" width="425" height="344"[/flash]
Programming / Re: Sudoku Puzzle by sbucareer(f): 5:02pm On Jul 07, 2008
Politics / Re: Fani-Kayode Blames Occultists For 2006 Plane Crashes by sbucareer(f): 10:24pm On Jul 02, 2008

As if this air crash was not enough diabolical dilemma and this has to happen
Software/Programmer Market / Re: V.b 6.0 Product Key by sbucareer(f): 4:30pm On Jun 28, 2008

javaprince, how are you? Hope you are getting on with your Java? Kudos to your elbows
Software/Programmer Market / Re: V.b 6.0 Product Key by sbucareer(f): 12:33pm On Jun 28, 2008

Alex, your question is somewhat unsettling. You should never ask in a public forum about product key or serial  keys.  If you loose your product key contact the vendor for assistance.

Otherwise, if you bend on illegal keys then, google torrents for help and beware of trojan horse

PS
Lucky was mocking with you. You better check your sense of humour!
Romance / Re: Cure To A Broken Heart! by sbucareer(f): 1:18am On Jun 18, 2008


The only cure is Time.
Education / Good Secondary Schools In Lagos by sbucareer(f): 7:05pm On Jun 16, 2008

Please I am scouting for information regarding good secondary schools in Nigeria, particularly Lagos state. Please if you know any information about schools, which may including their tuition fees, location, website and league table of the school could you be kind enough to share it, thanks
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 1:12pm On Jun 14, 2008

Ogejoy and chisimdi, thanks again for your insight to this knotty Igbo soup. Thanks again particulary to chisimdi for that Oha Soup more grace to your elbow.

Chukwu gozie unu.
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 10:39am On Jun 14, 2008

chisimdi could you be kind enough post how to cook Ugha soup or Egusi, thanks?
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 10:32am On Jun 14, 2008

Ogejoy and chisimdi thank you very much for that information. More of that

Recommendation to orisebawo suggestion

1. Presidential Restaurant - Old Kent Rd
2. 8O5 Restaurant - Old Kent Rd

Business / Re: Valid Credit Card Needed by sbucareer(f): 10:06am On Jun 14, 2008

Now, see as you disgrace yourself, moomu. Maybe you need plastic surgery b4 your monkey face can allow you to say common hello to a woman, animal.

You should be given polonium-210 so you can die gracefully, idiot.
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 9:39am On Jun 14, 2008
engineerd:
don't mind amber, some people just like to comment on matters that don't concern them, just cause they feel they can. I appreciate u leila, for u to come on Nairaland to ask for cooking help just so your husband is pleased with u shows u are a woman of virtue , Indeed your mom taught u well, so do u have any sister, age ranging between 23 and 26


ROTFLMFAO!!!!

grin grin grin grin
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 8:07pm On Jun 13, 2008

Method-Man oky!!! chia daa! Sorry Engineerd, more grease to your elbow.

cheesy
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 8:05pm On Jun 13, 2008

Leilah, at least he has brother that he goes to and eats his akpu and loilo with whatever soup. Ask him to get his brother to teach you to make whatever food he wants.

Also, he should not really complain, if food and fufu was so most of his interest in a woman, believe me he would not have married you unless he has a hidden agenda, which I believe he doesn't with the help of God
Food / Re: What Can I Cook For My Igbo Husband? by sbucareer(f): 7:56pm On Jun 13, 2008

Engineered, how can she marry you? She is in the UK and you are at Onitisha?
Webmasters / Re: Email Retrieval With Php - Help Anyone? by sbucareer(f): 7:46pm On Jun 13, 2008

Why do you need to reinvent the wheel? Use Outlook Express to access any known email server on Earth. As long as you know the email server config, I don’t see why Outlook cannot retrieve your emails.

About marking read and unread attributes, log into your original email facade and go to setting and configure your server to allow program to retrieve emails and leave the original email in the server.

Unless there is another requirement you are trying to achieve without our direct knowledge, Outlook will be sufficient for your task.

Details of email server config

1. You must know your SMTP i.e. smtp.domain.com
2. You must know your POP/IMAP/POP3 i.e. pop.domain.com
3. You must also know the ports for your SMTP and POP

Remember, SMTP is used in sending email out of your software i.e. Outlook, whilst POP/IMAP/POP3 etc, are used for receiving email and using pop need a username and passwd settings

I just remembered, you can tell Outlook to leave original email in the server

Programming / Re: Java Programming Vs Networking: Which Is More Profitable In Nigeria? by sbucareer(f): 9:45pm On Jun 11, 2008

kanirip, thanks for that last post. You said your mind at least. Incase anyone happens to work for cscsnigerialtd, your problem is cluster.

Your Information Technology is not deployed very well and perhaps listen to Kanirip and get proper software developer to tweak the system. Don't feel bad. Even in the UK, their critical software system is designed by Indians and maintain by Britons.

You can use the same concept. By maintaining other people software you can learn a lot for yourself.
Programming / Re: Local Software Piracy (Otigba Boys) - The Way Forward by sbucareer(f): 9:20pm On Jun 11, 2008

Otigba boys!!! Igbakiri igba boys -  I de salute
Programming / Re: Java Server Pages (jsp) Or Java Server Face(jsf Which Path To Trend? ? ? ? by sbucareer(f): 5:16pm On Jun 11, 2008

Soon be back got to do something righ now
Programming / Re: Java Server Pages (jsp) Or Java Server Face(jsf Which Path To Trend? ? ? ? by sbucareer(f): 5:13pm On Jun 11, 2008

Javaprince as you said that your strength is Desktop, Don't bother with above API, concentrate on Swing API and JSwing API

Remember, JSwing or Swing and AWT are not for Web application development, they are for Desktop development
Computers / Re: Internet Connection In Uyo,akwa Ibom State by sbucareer(f): 6:40pm On Jun 09, 2008
x
Software/Programmer Market / Re: Get Paid To Help Build A Php Form Handler - Urgently by sbucareer(f): 6:57pm On Jun 07, 2008

Do you mean submit forms like this


<HTML>
<HED><TITLE>Submit Page</TITLE>
</HEAD>

<!-- The body of the form is cleared within the body of HTML -->
<BODY>

<DIV ALIGN=CENTER>
<FORM ACTION="MAILTO:SBUCAREER@HTOMAIL.COM" METHOD=POST NAME="SubmitForm">
<TABLE BORDER=0>

<TR>
<TD ALIGN=LEFT>Firstname</TD>
<TD ALIGN=LEFT><INPUT TYPE=text NAME=firstname></TD>
<TD ALIGN=LEFT>Lastname</TD>
<TD ALIGN=LEFT><INPUT TYPE=text NAME=lastname></TD>
</TR>

<TR>
<TD ALIGN=LEFT>Email</TD>
<TD ALIGN=LEFT><INPUT TYPE=text NAME=email></TD>
</TR>

<TR>
<TD></TD>
</TR>

<TR>
<TD></TD>
</TR>

<TR>
<TD></TD>
</TR>

<TR>
<TD></TD>
</TR>


<TD ALIGN=LEFT>Comments</TD>

<TD ALIGN=LEFT><textarea rows="10" cols="30" WRAP=PHYSICAL></textarea>
></TD>
</TR>

<TR>
<TD><INPUT TYPE=submit VALUE=Submit></TD>
</TR>

</TABLE>
</FORM>
</DIV>

</BODY>
</HTML>


In the ACTION tag you can put your PHP/PERL/JSP/SERVLET/ASP etc. there. If your question was to design a program that will do the same thing as the default HTML mailto, tell us the language you wan it in
Software/Programmer Market / Re: Get Paid To Help Build A Php Form Handler - Urgently by sbucareer(f): 5:02pm On Jun 07, 2008

What do you mean by HTML form handler? In what language?
Literature / Re: Who Is Your Best Foreign Writer by sbucareer(f): 8:14pm On May 31, 2008

My best writers would be:

1. John Perkins
2. Samantha Power
3. Rodney Walter

African writers

1. Wole Soyinka
2. Chimamanda Ngozi Adichie

Programming / Re: Ccna Certification by sbucareer(f): 4:15am On May 31, 2008
[size=24pt]

Don't send anymore emails to me I do not have the emanuals any longer, sorry!

[/size]
Art, Graphics & Video / Re: Discover How To Build A Computer In Seconds by sbucareer(f): 3:03pm On May 29, 2008

You can also visit these links for additional reading list:

1. Codinghorror
2. cr.yp.to

Programming / Re: Java Or C++ by sbucareer(f): 12:24pm On May 29, 2008

No logica, I just want to be clear
Programming / Re: Java Or C++ by sbucareer(f): 9:03pm On May 28, 2008

Thanks for the clarification, but what is the difference between C and C++?
Programming / Re: Java Peeps Hook Me Up With A Solution Pls by sbucareer(f): 8:38pm On May 28, 2008

I hope this helps you with the rest of the assignment. Incase you want to get a particularly person from the Vector list, do this



for (int index = 0; index < list.size(); index++){
   if (list.elementAt(index) instanceof person.getTelephone() )
        Do something
}


Remember person will be the instance of the object you are looking for in the list. Not very efficient but you can come up with clever algorithm

You can add another method in Person class for enquiry i.e,


private String getTelephone(String tele){
  if ( this.telephoneNumber == tele )
        return this.telephoneNumber;
}//End getTelephoneNumber

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 38 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 48
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.