Page 15 of 34 FirstFirst ... 51213141516171825 ... LastLast
Results 141 to 150 of 335
  1. #141
    Senior Member
    Join Date
    Jun 2006
    Gender
    Male
    Posts
    866

    Default Re: Java Programming


    Quote Originally Posted by boxingfan529
    you can redo the code to support for your module. or get the concept how the programmer implemented it and create it from scratch.
    Yeah... That's what I'm planning to do.. But first, I'll have to assess the implementation and the affected areas for this change..

  2. #142

    Default Re: Java Programming

    guys, i have this problem on searching strings!! can anyone help me about it!!

    this problem wud search a data on a file...

    dara and code ai....

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;

    public class SearchRecord extends JFrame implements ActionListener{

    public static final int width = 300;
    public static final int height = 250;
    JTextField tfSearchItem;
    JLabel displayItem;
    JTextArea textArea;

    public SearchRecord(){

    JPanel North;
    JPanel South;

    setTitle("Search Record");
    setSize(width,height);
    Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    JLabel searchItem = new JLabel("Enter Record");
    tfSearchItem = new JTextField(10);

    JButton search = new JButton("Search");
    search.addActionListener(this);

    JButton clear = new JButton("Clear");
    clear.addActionListener(this);

    textArea = new JTextArea(5,23);

    North = new JPanel();
    North.setLayout(new FlowLayout());
    North.add(searchItem);
    North.add(tfSearchItem);

    contentPane.add(North,BorderLayout.NORTH);

    South = new JPanel();
    South.setLayout(new FlowLayout());
    South.add(search);
    South.add(textArea);

    contentPane.add(South,BorderLayout.CENTER);
    }

    public void actionPerformed(ActionEvent e){


    String command = e.getActionCommand();
    if("Search".equals(command)){
    String line1 = null;
    line1 = tfSearchItem.getText();
    try{
    BufferedReader inputStream = null;
    inputStream = new BufferedReader(new FileReader("students.txt"));
    String line = null;


    while((line = inputStream.readLine()) != null){
    if(line.equals(line1) == true){
    textArea.setText(line);
    }
    else
    textArea.setText("not Found!!");
    }

    }
    catch(IOException exe){
    //do something here.
    }
    }//if

    if("Clear".equals(command)){
    //do something here.
    }
    }//actionPerformed


    public static void main(String[] args){
    SearchRecord r = new SearchRecord();
    r.setVisible(true);
    }
    }

    mo type kag word sa textfield and then mo display siya sa textArea nga akong gibuhat diha!! unsa may class nga akong gamiton para maka search ko!! hope u will give me some advise! tanx....


  3. #143

    Default Re: Java Programming

    Use the class Document and its derived classes like DefaultStyledDocument. Assign this in the JTextAre.setDocument() method. Check also the demo on Notepad.

  4. #144

    Default Re: Java Programming

    ako na diayng na solve ako probs!!

    ni gamit ra kog indexOf() nga method! unya gi sud nako siya sa while nga loop!! dali ra mn diay!! hehehehehe....

  5. #145

    Default Re: Java Programming

    cool!

    di diay apil ang seach and hightlight? kung simple lang, magamit ra nimo ang String nga class.

  6. #146

    Default Re: Java Programming

    tanx kaayo boxinFan ni tagad jud ka sa kwe probs!! hehehehe

  7. #147

    Default Re: Java Programming

    no problem...

  8. #148

    Default Re: Java Programming

    hey guys been following this thread .. im quite impress about the support you share.. I guess its about time to sticky this thread .. .
    ALONE:Hated and Punished

  9. #149

    Default Re: Java Programming

    heeyy!!! mga java programmer! unsa namn ayo nto??

  10. #150

    Default Re: Java Programming

    daghan opening ron sa manila ug singapore even japan for j2ee developers for old timers.

    for newbies, you can hone your skills sa NSP, Pejman, etc.

  11.    Advertisement

Page 15 of 34 FirstFirst ... 51213141516171825 ... LastLast

Similar Threads

 
  1. JAVA PROGRAMMING *****
    By bardnekom in forum Programming
    Replies: 20
    Last Post: 04-18-2013, 12:51 PM
  2. MOVED: JAVA PROGRAMMING *****
    By vern in forum Software & Games (Old)
    Replies: 0
    Last Post: 03-23-2008, 02:43 AM
  3. Java programming help pls...
    By mr_gwen in forum Programming
    Replies: 6
    Last Post: 11-03-2006, 12:30 AM
  4. nid help..java programming
    By ronninalpha in forum Programming
    Replies: 3
    Last Post: 09-13-2006, 07:55 PM
  5. MOVED: Java Programming
    By BadDudes in forum Software & Games (Old)
    Replies: 0
    Last Post: 04-28-2006, 12:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top