How to remove effect of defaultHighlighter in JTable ???

I am working on code of "find"(ctrl+f) function , which ll highlight the 'search keyword' after clicking on 'find/find All' buttons...
eg. - If text in cell is "I Love My India" .. if search keyword is "Ind" then it ll highlight that particular characters only....
Now I want to deselect(ie. it should not be highlighted) the highlighted word.
How do I do this???
[ I have used tableCellRenderer  & defaultHighlighter to highlight the search  keyword ]
Thanks in advance
Suyog

I have used these classes to highlight keyword inside the JTable cell...Like I said there is no such thing as a "default highlighter" for a JTable.
The default renderer for a table is a JLabel. As I told you in your other posting a JLabel does not support a "highlighter".
So it would appear that you are now using a JTextField as a renderer. This means you have written custom code to do the highlighting, so you should be able to modify your code to remove the highlighting.
I just want to know is there any ready made method or trick to remove highlight effect...The trick would be to read the API that you quoted. I would guess the "remove" methods would do what you want.

Similar Messages

  • How to remove effect presets from a clip?

    I'm learning how to use Premiere Elements 8 from Adobe's official Help document.
    I'm currently working through Chapter 10, "Applying effects", section "Working with effect presets" -> "Apply an effect preset".
    The Help document doesn't tell how to remove an effect preset you had applied.
    I've tried to follow the instructions for removing regular effects, but they don't seem to work in the case of presets.
    How can i remove effect presets from a clip?

    I suspect it's actually a standard PE terminology that i'd better get acquainted with.
    I wanted to address this part separately. Actually, "workflow" is more of a video, or at least NLE term, and is not specific to PrE.
    As for terminology, this ARTICLE might prove useful.
    As I attempt to point out, some of these terms might be applied slightly differently, depending on the exact program used. As a for instance, PrE 8 has moved all of the Export options to Share. I still write "Export/Share" in case a PrE 2 through 7 user reads it. Terms can change. Also, Avid might call one common operation by one name, and Final Cut Pro use a different one.
    For me, I had to learn some new terms. I can from a film background. Terms were changed with video. For instance, my old Fade-to-Black is now Dip-to-Black in most NLE's. First time that I typed Fade-to-Black, everyone came back with "huh???"
    I read a lot of books on general editing of both video and audio. Some authors use different programs, and though the core theories are the same, their terminology can be rooted in their program of choice.
    Also, with regards to audio, many still use a lot of the terminology from the analog days, and keep them, because analog is still part of the workflow in most productions - think of the mics, for instance. There is generally less analog left in video, unless someone needs to telecine film to digital, or transfer VHS tapes to digital. More of the total workflow is all in digital, so my old film school terms have faded.
    One of the things that I attempt to do is differentiate exaclty what I am talking about. If I type video, I mean video in general. If I type Video, I am talking about the video Assets in a Project. Notice that Assets is also capatilized, as that is a term from the NLE and is specific to all things, SFX, Video, Audio, etc. used. Sometimes I slip up. I use project to mean the whole thing, and Project to mean the setup in the NLE, that will result in either a .PREL, or .PRPROJ file from my Adobe editors. Does this make sense?
    Good luck,
    Hunt

  • How to remove a row from a jtable with DefaultTableModel

    Hi to all,]
    I want to remove a row from jtable. I am using DefaultTableModel.
    I have got some example but every example is given with AbstractTableModel
    Please help me...
    Thanks and Regards

    I want to remove a row from jtable. I am using DefaultTableModel.How do you program without reading the API.
    The name of the method you use is "removeRow". How hard is that to find by reading the API?
    Not only do you not bother to read the API, you don't even bother to read and respond to your old postings when you get help:
    http://forum.java.sun.com/thread.jspa?threadID=5137773
    http://forum.java.sun.com/thread.jspa?threadID=5134667
    http://forum.java.sun.com/thread.jspa?threadID=5131162
    Your on your own in the future.

  • How to remove cells interection line in JTable

    Hello
    I am new to Java Programming
    I am facing a problem which i did not know how to solve so i need help from experts of this forum
    I have JTable of lets say 5 columns and from that i want to hide some columsn e.g i want to get only column 0(or ist column) and column 5(5th column) visible to me and not the inbetween columns(i.e 2,3,4) so i coded it like this:
    for(int count=0;count< ConnectedDrivestable.getColumnCount();count++)
                   tcm = ConnectedDrivestable.getColumnModel();
                   cm=tcm.getColumn(count);
                  if( count==0 || count==4)
                       cm.setPreferredWidth(15);
                   cm.setMinWidth(0);                   
                       cm.setMaxWidth(15);                   
                  else {
                       //ConnectedDrivestable.removeColumn(cm);
                           //ConnectedDrivestable.removeColumn(tcm.getColumn(count));
                       cm.setPreferredWidth(0);
                   cm.setMinWidth(0);          
                       cm.setMaxWidth(0);
              }where ConnectedDrivestable is my JTable of lets say 5 rows and 5 columns
    tcm is TableColumnModel and cm is TableColumn object
    But the problem is that i am getting vertical line in between and that is the intersection line of column 1 and column 5(i.e the intersection line of two columns that are visible) i dont want this in between vertical line to appear
    I really dont know how to fix this problem i have searched on internet but unable to find the appropriate solution to it
    Also as shown in my code i tried to work with removeColumn method which documentation says should remove the desired columns but i dont know why it is not functioing for my case the way i acpected am i doing something wrong or?
    So urgent help from people here is required
    Thanks in advance
    Imran

    Hello
    Thanks for reply and thanks for help
    Do please tell me that i am rendering cells of JTable with JLabel it is working fine but i want to span JLabel onto multicells in the same row
    Second i want to change the size of JLabel so that if not needed JLabel did not cover the whole Cell
    A bit of code which i am using to do cel rendering is attched for your kind considerations
    ConnectedDrivestable.getColumnModel().getColumn(1).setCellRenderer((new  DefaultTableCellRenderer ()
                   public Component getTableCellRendererComponent(JTable table, Object value,
                             boolean isSelected,
                             boolean hasFocus,
                             int row, int column)
                        JLabel Jlbl=new JLabel();
                        if(row==2)
                             ((JComponent)Jlbl).setOpaque(true); //if comp is a JLabel:Necessary
                             //Jlbl.setBorder(BorderFactory.createLineBorder(Color.BLACK));
                             Jlbl.setBackground(Color.GREEN);
                             Jlbl.setLocation(row,column);
                             System.out.print("The Column number is : "+column);
                             System.out.print("The answer is: "+ column+2);
                             ((JComponent)Jlbl).setMinimumSize(new Dimension(1,1));
                             ((JComponent)Jlbl).setMaximumSize(new Dimension(0,0));
                        return Jlbl;
                        //return comp;
              }));Another piece of code which i got from internet for doing the same is
    ConnectedDrivestable.getColumnModel().getColumn(2).setCellRenderer((new  DefaultTableCellRenderer ()
                   public Component getTableCellRendererComponent(JTable table, Object value,
                             boolean isSelected,
                             boolean hasFocus,
                             int row, int column)
                        Component comp = super.getTableCellRendererComponent
                             (table, value, isSelected, hasFocus, row, column);                         
                        //((JComponent)comp).setBorder(new LineBorder(Color.BLACK));                         
                        if(row==2 && column==2)
                             //((JComponent)comp).setBorder(new LineBorder(Color.BLACK));
                             comp.setBackground(Color.GREEN);
                             ((JComponent)comp).setMinimumSize(new Dimension(1,1));
                             ((JComponent)comp).setMaximumSize(new Dimension(1,1));                                   
                        else
                             comp.setBackground(Color.white);
                        return comp;
              }));These both work but as i tried to change the size of JLabel in the Cells it did not work also if i wanted to span JLabels to multiple cells(Column) is it not working
    Also as in code snippet i am trying to set the border which works fine but what i want is that after spanning JLabel to multiple cells then i want border along this how to do this help in this regard too?might if i could span JLabel to diffrent columns might i able to set border aroung them too
    I am putting under old forum topic this question as it is realted to my same problem so do please apologize me.
    I do need urgent help in this regard so kind help is needed
    Regards

  • How to remove a row from JTable

    Hi!
    I'm used to remove rows from JTables getting the model and doing a removeRow(num) like this:
    ((DefaultTableModel)jTable1.getModel()).removeRow(0);
    But with ADF and JDeveloper the model says it's a JUTableBinding.JUTableModel but its not accessible.
    How to remove a row in Jdeveloper 10.1.3.4.0?

    Or maybe is just better to refresh data in the jTable but I do not know either like doing it.

  • How to remove text from JTable ...........

    AOA
    How to remove the text from cells of JPanel. Just to refresh the GUI.
    regards

    How to provide meaningful subject?
    The subject of this thread does not match what you are asking in the body.
    To set the value of a cell in a JTable, you can simply call setValueAt().
    Read the API to find the method parameters.

  • How to remove filter or effect  ?

    I cannot remove effect .

    I cannot use undo after save project. 
    I need to remove effect but I don't need remove any task after effect added.
    Example
    Task 1 crop photo
    Task 2 apply effect
    Task 3 add layer
    I need to remove task 2 but I don't need remove task 3.
    If I use undo function . I will lost task 3.
    ส่งจาก iPad ของฉัน
    ณ 13 มี.ค. 2555 เวลา 3:10 Luanne Seymour <[email protected]> เขียน:
    Re: How to remove filter or effect ?
    created by Luanne Seymour in Adobe Photoshop Touch - View the full discussion
    Hi hugo2002,
    You can remove an effect by using the Undo button. Here is a picture of where you will find it:
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-4262185-174700/450-337/Undo.pn g
    I like to make a copy of my original before I start using effects. I do this by choosing Duplicate Layer from the Add Layers menu. That way I always have the original image to go back to in case I don't like some of my image experiments.
    I hope this helps,
    Luanne
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4262185#4262185
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4262185#4262185. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Photoshop Touch by email or at Adobe Forums
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How do I effectively remove multiple duplicate contacts from S5?

    How do I effectively remove multiple duplicate contacts from Samsung S5? Genius who sold me the phone duplicated ALL of my existing contacts.

        Thank you for reaching back out to us, if your contacts are backed up by GMail, if you log in to your account on a PC, they should appear online under the Contacts tab. Try this also, if you go to Contacts>Settings icon(three vertical dots button) Settings>Contacts to Display> What options are selected? This screen will help you pick and choose what contacts list to display.
    NicandroN_VZW
    Follow us on twitter @VZWSupport

  • How to remove or change wipe effect in MenuBar?

    Does anyone know how to remove or change the default wipe
    effect in Flex 3's MenuBar? I've seen several mentions online about
    an openDuration property in the Menu class, but not in MenuBar. I
    would greatly prefer to have either no effect or just a very brief
    fade.
    A solution in either MXML or ActionScript would be greatly
    appreciated.
    Thanks very much!
    Mike Laurence

    We had an old version of Dreamweaver (DW-MX) in which I have found the layer. It apears to be an image made in Photoshop.
    The way I solved the problem now is that I deleted the layer in DW-MX and made a new background image. I am no pro, just an amateur
    Anyway, thank you very much for your fast reply and the offer to help me out this problem.

  • How to remove JTable header from JScrollPane?

    Hi!
    Does anyone know how to remove the JTable header from the JScrollPane the table is placed in? I tried calling
    scrollpane.setColumnHeader( null ) and
    scrollpane.setColumnHeaderView( null )
    but none of the above worked...
    Thanks!
    Fil

    Hi,
    The easiest way to do this is to put an extra layer between the table and the scrollpane as follows:-
    JPanel p = new JPanel(new BorderLayout());
    // Add it to the north rather than center so that the table background color
    // won't cover the empty part of the view port.
    p.add(table, BorderLayout.NORTH);
    JViewport v = tableScroll.getViewport();
    v.setView(p);
    where table is your JTable and tableScroll is your JScrollPane.
    Hope this helps,
    Ian

  • How to remove ticking noise and doing audio effects?

    I have a snippet of code I got for generating delay effects. After editing the appropriate things, I ran the application. It produces delays but (if i hear it correctly), the delayed sounds do not fade. It sounds like a mix of sounds. Does it depend on feedback? And there's this ticking noise accompanying the output. I just want to know how "ticking sounds" are produced (and probably how to remove them) and how to produce a correct delay.Here's my program.
    public void delayProcessor(double[] data, int sampleRate, int delayInMs){
            //initialization
            int delayOffset = (int) ((delayInMs * sampleRate * 1) / 1000);
            double[] buffer = data;
            int k = 0;
            delayBufferSize = data.length + delayOffset;
            delayBuffer = new double[delayBufferSize];
            // Index where dry sample is written
            writeIndex = 0;
            // Index where wet sample is read
            readIndex = data.length;
            for (int i=0; i < data.length; i++)
                double inputSample =  data;
    double delaySample = delayBuffer[readIndex++];
    double outputSample = (inputSample * dryLevel) + (delaySample * wetLevel);
    // make sure output is in range
    if (outputSample > 1)
    outputSample = 1;
    else if (outputSample < -1)
    outputSample = -1;
    // Store in output sample
    data[i] = outputSample;
    // Calculate feedback
    inputSample += (delaySample * feedbackLevel);
    // make sure input is in range
    if (inputSample > 1)
    inputSample = 1;
    else if (inputSample < -1)
    inputSample = -1;
    delayBuffer[writeIndex] = inputSample;
    writeIndex++;
    // Update indices
    readIndex %= delayBufferSize;
    writeIndex %= delayBufferSize;
    My sample rate depends on the user's desired setting but I'm currently testing on 11025. It's also mono, 16-bits if that information helps.
    Thanks in advance! :D                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi. Updated my code from the one above to this:
    public void echoProcessor(double[] samples, double decay, int sampleRate){
         int delayOffset = (int) (10 * sampleRate)/1000;
         int delayBufferSize = samples.length + delayOffset;
         double[] delayBuffer = new delayBuffer[delayBufferSize];
         int writeIndex = 0, readIndex = delayOffset;
         int i =0;
         for(i = 0; i < delayBufferSize; i++)
              delayBuffer[i] = 0;
         for(i = 0; i < samples.length; i++){     
              double oldSample = samples;
              double delay = delayBuffer[readIndex];
              double newSample = oldSample + (decay * delay);
              delayBuffer[writeIndex] = outputSample;
              readIndex++;
              writeIndex++;
              if(readIndex == delayBufferSize)
                   readIndex = 0;
    But I still get the continuous ticking sound but now I hear the sound output which somehow produces an echo.
    The double[] samples has a length of 512 then I convert it to bytes before writing to the SourceDataLine. Any ideas?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Does anyone know how to remove the fisheye effect from a gopro camera, remove it with premiere pro c

    Does anyone know how to remove the fisheye effect from a gopro camera, remove it with premiere pro cc.

    Use the Lens Distortion effect, set curvature to your liking.

  • How can i add rows to a JTable at run time ??????

    hi there
    how can i add a row to a JTable at run time? and display the table after the change? thank you.

    For adding or removing the rows from the JTable, you have to use the methods on the table model. I would show you a simple implementation of table model.
    public class MyTableModel extends AbstractTableModel {
    private ArrayList rowsList = null;
    private String [] columns = { "Column 1" , "Column 2", "Column 3"};
    public MyTableModel() {
    rowsList = new ArrayList();
    public int getRowCount() {
    return rowsList.size();
    public int getColumnCount() {
    return columns.length;
    public void addRow(MyRow myRow) {
    //MyRow is any of your object.
    rowsList.add(myRow);
    fireTableDataChanged();
    public void removeRow(int rowIndex) {
    rowsList.remove(rowIndex);
    fireTableRowsDeleted(rowIndex, rowIndex);
    public Object getValueAt(int row, in col) {
    MyRow currentRow = (MyRow)rowsList.get(row);
    switch (col) {
    case 0:
    //return the value of first cell
    break;
    case 1 :
    //return the value of second cell
    break;
    case 2 :
    //return the value of third cell
    break;
    }Then create the table using the TableModel using the constructor new JTable(TableModel) and then when you want to add/remove a row from the table, call myTableModel.addRow(MyRow) or myTableModel.removeRow(rowIndex)....I hope that this solves your problem.

  • In the libary of iPhoto I do have double pictures only in the year 2006. Can someone please tell me how to remove the double pictures. I did rebuilt the libary but that solution did not help me any further.

    In the libary of iPhoto I do have double pictures only in the year 2006. Can someone please tell me how to remove the double pictures. I did rebuilt the libary but that solution did not help me any further.

    I think the warning is very clear.
    What warning? Where do you say that this plan you suggest will lose at least some, and possibly a whole lot of metadata, plus  the original files of edited photos. This is significant dataloss. And you should warn people that this is the case.
    While your metadata and originals may not be important to you, that is not necessarily the case for other users.
    Fourthly, and last, cleaning the iPhoto library should be done at least once per year
    This is nonsense. The iPhoto Library has no need of "cleaning" and certainly not in any way that trashes a whole lot of data.
    I'm very impressed that you assess the application based on the sound of the name. It's not a common way to review applications, but I'm sure it has some merit.
    FWIW it has been recommended on this - and other - sites for many years and has proven safe and effective.
    Regards
    TD

  • How to swap Effects on a video processor?

    I have written a JMF based program that plays a video and applies an effect (I have written) to it. The code works just fine, but now I want to add the ability to add or swap other effects. The problem is I can't figure out how to correctly do this, and can't find any examples to model. Here's some of the relevant code:
         MediaLocator locator = new MediaLocator(videoFile);
         try {
              processor = Manager.createProcessor(locator);
              } catch (NoProcessorException e) {
                   System.out.println(e);
              } catch (IOException e) {
                   System.out.println(e);
         processor.addControllerListener(this);
         processor.configure();
         public void controllerUpdate(ControllerEvent event) {
              processor = (Processor) event.getSourceController();
              if (event instanceof ConfigureCompleteEvent) {
                   processor.setContentDescriptor(null);
                   TrackControl[] controls = processor.getTrackControls();
                   for (int i = 0; i < controls.length; i++) {
                        if (controls.getFormat() instanceof VideoFormat) {
                             videoTrack = controls[i];
                        else
                             controls[i].setFormat(new AudioFormat(AudioFormat.LINEAR));
                        try {
                             Codec codec[] = { new BorderEffect() };
                             videoTrack.setCodecChain(codec);
                        } catch (UnsupportedPlugInException e) {
                             System.err.println(e);
                   processor.prefetch();
                   processor.start();
              } else if (event instanceof RealizeCompleteEvent){
                   SwingUtilities.invokeLater(new AddComponentsThread());
              } else if (event instanceof EndOfMediaEvent) {
                   processor.setMediaTime(new Time(0));
                   processor.start();
         If I change the line Codec codec[] = { new BorderEffect() };toCodec codec[] = { new ConvolveEffect() };it works fine with the new convolve. Alternately if I change it to:Codec codec[] = { new BorderEffect(), new ConvolveEffect() };the video gets both effects added. But so far I haven't been able to react to a user button click to change from one effect to the other.
    First I tried to call processor.removeControllerListener() and processor.stop(), call a method to change the codec referenced just above and then call processor.addControllerListener(this) and processor.configure() all over again. This didn't work.
    After a bit of reading I have think there are two other tactics:
    *(1)* use a PluginManager and call addPlugin() or removePlugin() to enable / disable. I can't find any examples of using a PluginManager and some things aren't clear. Like - one you call addPlugin() do you still need the lines about new codec, setCodecChain() etc?
    *(2)* chain processors together to add effects, remove a processor from the chain to remove effects. The DataOutput of a processor allows the output of one to be fed to the input of another.
    I haven't been able to get any of these methods to work so far. Any ideas on what is the proper way to swap in/out effects?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    No ideas yet?
    After trying some more things I have my program working ... well working in that I can apply different effects, but I think it is a pretty ugly solution. Here is a representative code snippet:
          if (ae.getActionCommand().equalsIgnoreCase("GREYSCALE")) {
                   processor.stop();
                   removeComponents();
                   processor.removeControllerListener(this);     
                   try {
                        processor = Manager.createProcessor(locator);
                   } catch (NoProcessorException npe) {
                        System.out.println("No Processor Exception");
                   } catch (IOException ioe) {
                        System.out.println("IO error creating player");
                   setCodec("GREYSCALE");
                   processor.addControllerListener(this);
                   processor.configure();                               
              }I wrote a custom method removeComponents() which calls removeAll() on the JPanel containing the video and controls to essentially wipe them out. Then remove the ControllerListener and create a whole new processor. (THIS does not seem to be an elegant or correct way of doing things!) Another custom method setCodec() is used to specify which codec to use, a ControllerListener is added and the new processor is configured.
    This DOES work, but I am quite sure it isn't the best or most elegant way of doing things. Any advice would be much appreciated.
    Edited by: craighagerman on Oct 24, 2009 6:34 PM

Maybe you are looking for

  • Open POs being seen in the report

    There are around 20 open POs in the system from 2006 which have not been goods issued or goods receipts properly due to which the delivery completed indicator cannot be ticked manually. These POs need to be closed so that they are no more vissible in

  • Could not resolve mx:Component to a component implementation

    Hi everyon I am trying to add a ItemRender to a datagrid column but the following compilation error comes up.. Could not resolve <mx:Component> to a component implementation I am actually using the exact same code as in this web http://www.adobe.com/

  • Text from another source?

    I want to create a flash website that has some text content (and other content also), so I want that the text would update based on a text file. I really don't know if it is possible, maybe there are other posibilities to make the text update from a

  • Email links are opening firefox

    I did not change any preferences -- but every live url in an email is now opening in Firefox and I always use Safari I can't find anywhere in Mail to change what the default browser is and it is driving me nuts

  • Re: Satellite M50-216 - WLan connection keeps disconnecting

    Model M50-216 I can connect to my hub no problem, and as a comparison I have another Laptop (dell) that never eperiences the problems I get with the Equium. Here's what happens. I connect no problem, then it may work fine for 5 mins or an hour, then