How to make a JList realtime searchable

I have a JList with data initialized from a Vector<String> and a JTextField which fires an event when a character i typed.
What I need is for the JList to be trimmed down in realtime. When I type 'E' I want everything in the list that begins with an *E' to be listed only and When I type 'EL' everything that begins with 'EL' and so on, and when the search field is empty the JList should revert to the old list.
Do I need to implement some sort algorithm, or can this be done easy?

There's probably something out there already, but all you need is a JTextField to type in, and a DocumentListener which is implemented to set the contents of the ListModel according to the contents of the Document. It's probably only a couple of dozen lines of code :o)

Similar Messages

  • How to make English and Chinese pdf files searchable?

    I have scanned many A4 English and Chinese print-outs into pdf format.  How to make these files searchable ? People mention about the OCR issue. Will the installation of Adobe make life easy and manageable?

    I know Acrobat does Japanese OCR very well; I can only assume that it works for Chinese as well.
    P.S. I just checked: Chinese (Simplified) and Chinese (Traditional) are both language selection options for OCR.

  • How do I make images of text searchable on a Mac?

    I am downloading a lot of PDFs from the New York Times archives (c. 1855) for some historical research I'm doing.
    I assume the Times has OCR'd their images of these old articles because the text is word-searchable online.
    Here are my questions, in descending order of the elation they might evoke. (BTW, I'm on a Mac, running Leopard.)
    1. Is the OCR text somehow embedded in the downloaded PDFs and how would I discover and retrieve it, using Acrobat Pro 9?
    2. Would it be worth trying Acrobat's built-in OCR tools to make these images word-searchable? (Mid-19th century Times type is pretty wavy and clunky.)
    3. Given that Macs can now word-search closed documents' body text, can I at least put key words in text box notes or stickies on these PDFs, to help me find important passages? (I've tried both text boxes and stickies but neither worked.)
    Thanks.

    For #1 — A PDF supports three OCR outputs. Searchable Image, Searchabel Image (Exact), or ClearScan. If an OCR output is with the NYT's PDFs I'd guess they are the first or the second. Either leaves a "layer" of hidden text.
    To retrieve the hidden text you could use Acrobat's File > Export. Choose the output from the choices available.
    For #2 — Sure, why not? Using a copy of a PDF give Searchable Image (Exact) a try.
    For #3 — You could use Acrobat Pro's Commenting tools. For a "commented" PDF you can use the Comments List for viewing/sorting.
    Be well...

  • How to make JList scrollable left right?

    Hi,
    How to make JList scrollable left right?
    Ty.

    jList MyList = new JList();
    JScrollPane  sp = new JScrollPane(MyJList,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);then the horizontal (and vertical if its the case) scrollbar will show up
    hope this helps

  • How to Make PDF files searchable?

    I am scanning hundreds of Meeting Minutes into PDF files.  How do I make sure they are searchable so that I won't have to create a separate index?  I prefer to let the reader type a word in the  "Search" box.  Thanks.

    You're right.  Fortunately there is an OCR in my scanning software, so I tested one PDF file I had already scanned, and yes it was searchable.  Apparently not all PDF files I see are searchable because whoever scanned those files did not have OCR in their scanning software.  I am now glad I spent a fortune on my Epson scanner. 

  • How to make a scanned PDF file searchable? I bought an Adobe service which I thought allowed me to do this

    How to make a scanned PDF file searchable? I bought an Adobe service which I thought allowed me to do this, but I do not see any instructions how to do it.

    Hi,
    When using Adobe ExportPDF online service, it will run OCR itself when converting any PDF to other file format.
    It also depends upon the quality of the scanned document, so it might be possible that it does not make the file searchable.
    Regards,
    Anubha

  • How to make a Flash site more searchable

    Hi all,
    I was wondering how to make a Flash site more searchable in
    search engines. I'm guessing it is with meta tags, can anyone tell
    me which meta tags or if there are any other hints or tricks.
    Thanks,
    MediaMan5335

    Sad to say MediaMan5335, there's no real defined way to read
    a Flash movie file. Currently there are tips and tricks to do it,
    but all of them are merely patches to somethin long overdue and
    needed. Since Google is setting the trend, the best way to gain
    ranking is to follow their set of new rules.
    There were several ways to gain rankings, whether is be
    paying your way to the top, putting multiple links within your
    site, or placing tons of words that would be read by spiders.
    Google has multiple articles pertaining to Search Engine
    Optizmization or SEO. Head on over to Google and just type in
    "Google SEO" and you'll find a multitude of articles.
    Right now to answer your question, META KEYWORDS and META
    DESCRIPTION are your best tools for METAs. Having legit links
    INBOUND and OUTBOUND will help.
    Currently there a several companies working on allowing SWFs
    to be read by Search Engines. Hopefully this helps answer your
    question. SEO can be a daunting thing.

  • How to make a select list editable or searchable like the combobox

    Does anybody know, How to make a select list editable or searchable like the combobox? Do we need a plugin here, where I can get it.

    Hi Nilesh,
    If this is what you are looking for http://apex.oracle.com/pls/apex/f?p=32395:3:1202144397644679
    get the combobox plug-in
    http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/searchable-combobox.html
    I have not tried this though. Found it while searching for some other plug-ins.
    Regards,
    -Senthil

  • How to make instruments persistent...

    Hi Forte Experts
    I keep setting the KeepAliveCycle parameter on my server, and it seems to disappear every now and then (at reboot?)
    So what is the correct procedure to set and keep this parameter alive...
    Do I have to modify the startup scripts to set this parameter during/After startup or can I just do some 'save' command somewhere... Am I just missing some Install command somewhere??
    I am using escript - forte version 3.0.e.2
    Best wishes from
    The Manual Reader..
    jens chr /KAD denmark
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    You need to put the values in the fortedef.csh or .sh file. This way every
    time the node manager starts up it will set the values automatically.
    setenv FORTE_KEEP_CYCLE 600
    setenv FORTE_KEEP_COUNT 3
    setenv FORTE_KEEP_INTERVAL 10
    ka
    Kamran Amin
    Forte Technical Leader, Core Systems
    (203)-459-7362 or 8-204-7362 - Trumbull
    [email protected]
    From: JCJJ[SMTP:[email protected]]
    Sent: Wednesday, January 20, 1999 5:08 PM
    To: [email protected]
    Subject: How to make instruments persistent...
    Hi Forte Experts
    I keep setting the KeepAliveCycle parameter on my server, and it seems to
    disappear every now and then (at reboot?)
    So what is the correct procedure to set and keep this parameter alive...
    Do I have to modify the startup scripts to set this parameter during/After
    startup or can I just do some 'save' command somewhere... Am I just
    missing some Install command somewhere??
    I am using escript - forte version 3.0.e.2
    Best wishes from
    The Manual Reader..
    jens chr /KAD denmark
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • How do you have JList display user defined element

    How do you have JList display the element you define???
    I tried:
    list.setSelectedIndex( 1 );
    list.ensureIndexIsVisible(1);
    because I want the element at index[1] in the list to be displayed when the GUI opens. It always defaults to element [0] (1st element).
    So if I have
    String[] colors = {blue, red, yellow};
    when the GUI opens, I want "red" to appear in the JList, but blue is always displayed...

    Sorry, that must've been cut off, here it is...
    What I want it to do is open and I want "green" to be the only element showing in the JList...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.Container;
    import javax.swing.JOptionPane;
    import java.lang.Object;
    import java.awt.event.*;
    import java.awt.Component;
    import javax.swing.JOptionPane;
    import java.awt.BorderLayout;
    //import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    //import javax.media.jai.JAI;
    //import javax.media.jai.PlanarImage;
    import javax.swing.BorderFactory;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JComponent;
    import javax.swing.SpringLayout;
    import javax.swing.border.BevelBorder;
    * Simple applications for demonstrating the use of FormUtility
    * to hide the details of creating a form layout with
    * GridBagLayout.
    * <P>
    * Philip Isenhour - 060628 - http://javatechniques.com/
    public class correctOfficerGUI extends JFrame
            private JPanel form;
            private final JFrame f;
            //public final int lineCount = 0;
            //EASTERN NY
            public static String nameInfoString   = new String();
            String facilities[] = {     "blue",     "green", "yellow"};
        public correctOfficerGUI()
            //JFrame
            f = new JFrame("Add Officer");
            //int x = f.DoModal();
            // Make a panel to hold the demo �form", then
            // add it to the top of the frame�s content pane
            //JPanel
            form = new JPanel();
            f.getContentPane().setLayout(new BorderLayout());
            f.getContentPane().add(form, BorderLayout.NORTH);
            // Set the form panel�s layout to GridBagLayout
            // and create a FormUtility to add things to it.
            form.setLayout(new GridBagLayout());
            JPanel spacerPanel = new JPanel();
            spacerPanel.setLayout(new BorderLayout());
            final JList list = new JList(facilities);
            int index = 2;
         list.setSelectedIndex( 1 );
            list.setVisibleRowCount(1);
         list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
         //contentpane
            form.add(new JScrollPane(list));
            JButton addButton = new JButton("Add");
            form.add(addButton);
            //addButton.add(       
         addButton.addActionListener(
              new ActionListener()
              public void actionPerformed( ActionEvent actionEvent )//valueChanged(ListSelectionEvent e)
                        //f.DoModal();
                        System.out.println("********************************************");
                        JOptionPane.showMessageDialog(null, "The Officer has been Added.");
            // Add an little padding around the form
            form.setBorder(new EmptyBorder(2, 2, 2, 2));
            f.setSize(300, 300);//230);
            f.setVisible(true);
        public static void main(String[] args)
            correctOfficerGUI test = new correctOfficerGUI();
         test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);       
    }Message was edited by:
    poncho

  • I was able copy the hardrive of my old macbook from "My Passport" onto the desktop on an older iMac. but i dont know how to make my hardrive and user name be the main one since someone had used it in the past and had their info on the comp. please help!

    I recently broke my 2008 macbook. i was able to use an external hardrive to back up my data onto My Passport. I was going to buy a new computer but a friend told me sher had an older version of the iMac. (not sure how old but it doesnt have a camera if that helps) i was able to hook it up and turn it on but i ran into a few problems. 1) the "authentic" user or whatever it says is someone who previously used the computer. i added me as a user but im not sure how to make me the main user. 2) after hooking up My Passport, i was able to drag my files and copy them to the desktop.(i think i did it correctly) now, i dont know how to make my hard drive and applications and iformation the "main " info. The current apps on the iMac are super old versions of iTunes and iPhoto and such. 3) while trying to open the apps from my macbook on the iMac, it said it didnt have the right software to open these apps.
    I am so computer illiterate so someone please help!!! Also, i do not have internet in my new apartment yet so if there is a way to make this happen without using the internet that would be preferred. sorry for the horrible spelling and poorly written paragraph.
    THANK YOU!!

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to make downloadable links in Adobe Muse

    I am new to website design and am trying to figure out how to make downloadable links for some PDF flyers, PSD templates I am creating.   Not sure if "downloadable links" is the correct term for what I'm trying to say but in a nutshell I am creating Business Flyer's in PDF form and Photoshop PSD template files that I would like to be able to have my users click a link that allows them to download them right to their desktop.  Any help would really be appreciated!

    Hi caybar10gaming,
    I had the same question as you and was searching online for how to add "downloadable links" as well so your not alone in that lol. Anyways, I found this video that explains how to do this. I hope this helps you, as it did me. Good Luck  
    http://tv.adobe.com/watch/muse-feature-tour/add-and-link-to-any-type-of-file/
    -Caitlin

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • How to make numbers in message text input  fields left aligned?

    Hi Friends
    I have completed one of my task .but getting result right side of the field.
    how to make numbers in message text input  fields left aligned?
    Thanks
    Aravinda

    Hi ,
    Sorry for late replay i am trying this alos not set that page....
    pageContext.forwardImmediatelyToCurrentPage(null, true, null);
    and one more that kff field working is fine for ex display any text pled displayed properly and only problem is not set the value and HrSitKeyFlex6 and HrSitKeyFlex7 fields are perfectly get the values but not pront HrSitKeyFlex8 that only my issue....
    Regards,
    Srini

Maybe you are looking for

  • Mac won't boot up if external hard drive is on

    I just purchased an external hard drive to use for my Time Machine backups. The "installation" instructions said that with the computer off, to power up the e.h.d., then power up the computer. Well, the computer is evidently trying to boot up from th

  • Select stmts with Having Clause

    Hi, Can some body help me to improve the performance of the below query... select t.seq_no,t.contract_id,t.date_from from test_plan_tab t group by t.seq_no,t.contract_id,t.date_from having (select count(*) from test_plan_tab p where p.contract_id = t

  • Rp_provide_from_last infotype subtype pn-begda pn-endda.

    Hi All, Is there a way to find out if a subtype exists before using this macro. If a subtype does not exist then it crashes. rp_provide_from_last infotype subtype pn-begda pn-endda. Thanks, ~Mark

  • Largest tables... LOB Segment

    HI, ina CRM system, we would liket to start a data archiving project... but the 10 largets tables are lob segment.... so how can approch the project in this case? Regards.

  • [svn:fx-trunk] 10641: Fix ambiguous reference error when compiling a performance test.

    Revision: 10641 Author:   [email protected] Date:     2009-09-28 08:44:38 -0700 (Mon, 28 Sep 2009) Log Message: Fix ambiguous reference error when compiling a performance test. Fully qualify mx.events.Requests in generated code for FlexInit. QE notes