Java lucene
Build your own search engine.
how can i implement lucene code in my GUI interface of search engine so that my search engine interface can fully functional for searching text files in my PC.
this is my GUI code for my search engine.
i am using eclipse to do this task.
package org.apache.lucene;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SearchEngines extends JFrame {
JButton btnsrc;
JButton btnidx;
JTextField qry;
JLabel label;
JLabel result;
JRadioButton poor;
JRadioButton average;
JRadioButton good;
public SearchEngines () {
Container pane = getContentPane();
pane.setLayout(new FlowLayout());
JPanel panel1 = new JPanel();
panel1.setLayout(new FlowLayout());
btnsrc = new JButton("Search");
label = new JLabel("Query:");
qry = new JTextField(20);
btnidx = new JButton("Index");
panel1.add(label);
panel1.add(qry);
panel1.add(btnsrc);
panel1.add(btnidx);
JPanel panel2 = new JPanel();
result = new JLabel("Search Result:");
panel2.add(result);
ButtonGroup grp = new ButtonGroup();
poor = new JRadioButton("Poor");
average = new JRadioButton("Average");
good = new JRadioButton("Good");
panel2.add(poor);
panel2.add(average);
panel2.add(good);
grp.add(poor);
grp.add(average);
grp.add(good);
pane.add(panel1);
pane.add(panel2);
}
public static void main (String []args)
{
SearchEngines frame = new SearchEngines();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setTitle("SEARCH ENGINE");
frame.setSize(500, 400);
frame. setVisible(true);
}
}
View Answers
Related Tutorials/Questions & Answers:
Java luceneJava lucene Build your own search engine.how can i implement
lucene code in my GUI interface of search engine so that my search engine interface can fully functional for searching text files in my PC.this is my GUI code for my
Advertisements