How can I color just one row in a table?

Hello,
I'm implementing cut/copy/paste and I want that when I perform cut the row color will be pale/ghost than the regular selectionRow background. And I want this pale color to stay for this row regardless if I select now other rows. I need it for JTable, JTree & JList. So my question is how can I color a row in those components (permanently - till I release it)
Thanks
Bnaya.

Hi,
for a JTable I would suggest the following:
1.in the body of the class
int ghostrow = -1;
Color ghostColor = Color.lightGray; // for example2. overwrite the prepareRenderer-method this way
public Component prepareRenderer(TableCellRenderer render,int row, int column) {
Component c = super.prepareRenderer(renderer,row,column);
if (row==ghostrow) c.setBackground(ghostColor);
return c;
}3. add a method in your JTable subclass for setting of the ghostrow like this, in order to force the JTable to update its display after setting ghostrow
public void setGhostRow(int row) {
TableModel tm = getModel();
int currow = tm.getRowCount();
int oldrow = ghostrow;
ghostrow = -1;
if (row<currow) ghostrow = row;
// next 2 rows in normal mode displayed, because it will not print the greater than symbol correctif ((oldrow>-1) && (oldrow<currow)) tableChanged(new TableModelEvent(tm,oldrow));
if ((ghostrow>-1) && (ghostrow<currow)) tableChanged(new TableModelEvent(tm,ghostrow));
For the other classes, you want this effect to happen in, try to find a similar method, that is central and do it in a similar way there.
greetings Marsian

Similar Messages

  • How can I Make just one color pop and the rest a black and white photo??

    How can I make just one color pop and the rest of the photo black and white?? I'm using iphoto...

    3rd party image editors like Photoshop Elements for Mac can do it:
    Click to play video screenshot
    Or use it to keep an object in color and the rest B/W.
    Click to view full size
    OT

  • How can i print just one page of photo book without printing the entire book

    how can i print just one page of photo book without printing the entire book

    Jim,
    Take heart.  We can help.
    First turn on page view so you can see how the content of your sheet fits on the page(s).  A Numbers document contains sheets (listed on the left) which in turn contain tables, charts, text, and graphics.  Select the sheet you want to print on the left, then enable page view by selecting the menu item:
    "View > Show Print View":
    Now you should see your content and how it fits on one, or more, pages.  If thie content is too big for one page use the controls and the bottom left of the window to expose the sheet controls:
    Here a table is too big to fit on one page:
    slide the "Content Scale" slider so the content fits:

  • How can we pass the entire rows of a table to a web service in a VC model ?

    Hi,
    On the click of the submit button, I have to pass the rows of two tables into an enterprise service. This service also takes other fields of a form as an input.
    How can we pass the entire rows of a table into a service ?
    Regards,
    Nitin

    Hi Nitin,
    It seems that you have two or three different structures to pass data using your webservice. In your main question, two tables, you can join both in one table and from there call the webservice. In order to pass the entire table you need:
    1. Draw a line between your joinned table and your service,
    2. Map the fields,
    3. Create a 'SUBMIT' in your table tool bar. Right click on your table and choose 'Create Toobar', '+', name and choose 'Submit' as your event.
    4. Go to Configure Element (Table View) 'Multiple' at Selection Mode.
    Reward points if helps you to solve your question.
    Regards,
    Gilson Teixeira

  • How can I publish just one page at a time?

    I switched to a new computer, so I moved the domain file. When I open iWeb, all the pages are there. I made one small change, and only want to update the one page, but since it's on a new computer, all the pages are red and I can't publish just one page - every time I try, iWeb tries to publish all the pages, and it errors out every time. Can anyone tell me how to make it publish just one page at time in spite of the fact that all the pages in the sidebar are red? The only reason I can think for the error message is that there's too much content to do it all at once.

    Yes. If you are uploading to a server and not MobileMe, then just select the option publish to a local folder.
    When you have done this, then use Cyberduck or Transmit and upload just the one page from your site folder to your server, plus it's resultant file. So if you just want to upload a Welcome page for example, use Cyberduck to upload just the Welcome.html page and the Welcome files to your server and into your root folder on your server, which would be either a public_html folder, a www or htdocs folder.

  • How can I publish just ONE site

    Everytime I create a new site and publish it to a folder (to place in my own domain) iWeb publishes ALL of the sites every time, no matter whether changes have been made to any site or not.
    How do I publish just ONE site?
    If I get mobile.me, will I be able to publish just the ONE site I wish to publish?
    Phil

    I use iWebSites to manage multiple sites.. It lets me create multiple sites and multiple domain files.
    If you have multiple sites in one domain file here's the workflow I used to split them into individual site files with iWebSites. Be sure to make a backup copy of your original Domain.sites files before starting the splitting process.
    This lets me edit several sites and only republish the one I want.
    OT

  • How can I scale just one dimension of a pic? I need to shrink the width only, to fit the frame.

    HELP!  How can I shink only one dimension?  I need to shrink the width slightly to fit the frame; the program only allows scaling that is proportional, so when I shrink the width the heigh becomes too short.  Father Mike

    I'd recommend using the rectangular marquee and the crop command. This will crop the image to an exact size without any resampling or distortion. Cropping without constraint can cause distortion...like giving someone a cone head.
    Check the size of the image first by either looking in the Image<Resize<Image Size. Make a notation of the height since you don't want to change that in this case. (While you are there, change the resolution to the desired output...make notation of height after this step if you changed the resolution.)
    Select the Rectangular Marquee tool. Change the setting in the options bar to "Fixed Size" and input the desired size. (Along with the numbers, specify in this box in what units you desire...px, in, etc.
    Drag the marquee to the desired location. (As long as the marquee tool is selected, this selection box can be moved around).
    Go up to the menu bar and select Edit<Crop.
    Reading material on Image<Resize<Image Size:
    http://help.adobe.com/en_US/PhotoshopElements/7.0_Win/WSae2ea3b149d0c3591ae939f103860b3d59 -7ee8.html
    Reading material on Crop Command:
    http://help.adobe.com/en_US/PhotoshopElements/7.0_Win/WSae2ea3b149d0c3591ae939f103860b3d59 -7eed.html

  • How can i explicitly lock a row of a Table

    Hi
    How can we implement optimistic locking , i am using Oracle as Database for my Application .
    Assume that i am working on a single row of a Table .
    Now please tell me how can i explicitly lock this row , so that other simultanoues users insert or update operations are not affected to this particular row .
    I am not using any ORM related technology
    Please help .

    raviprivate wrote:
    Hi
    How can we implement optimistic locking , i am using Oracle as Database for my Application .
    Assume that i am working on a single row of a Table .
    Now please tell me how can i explicitly lock this row , so that other simultanoues users insert or update operations are not affected to this particular row .Either you want optimistic locking which does not use (database) locks at all, or you want pessimistic locking which does use database locks.
    In optimistic locking everyone is allowed to read and to update without taking out a lock. Usually the optimistic lock is realised by including either a 'version' or 'last_modified' column which with every update is either increased (version) or set to the current_timestamp (last_modified). The update statement must be issued with a condition including that column (eg UPDATE ... WHERE id=<id> AND version=<version at time of read>). If the column was already changed by another user or process zero rows will have been updated signalling to the program that another user already changed the row and the user must redo his changes, or a more complex method of change comparison can be done.

  • How can I transfer JUST ONE IWeb site to another computer?

    I am new to making IWeb sites and am now making them for
    other people. I have about 10 sites in my IWeb folder and need to
    be able to give a person's site to them.
    I need to be able to transfer JUST ONE site to another computer.
    Right now, I am only able to transfer ALL the sites I have made to
    another mac and then, it wipes out all their sites! How can I prevent
    the ultimate wipe out of all their iweb sites yet give them JUST ONE
    of mine?
    thank you in advance,
    Beth http://www.yourzensite.com

    First, read Wyodor's post about changing the publishing settings HERE.
    You can create the extra folders in Home Folder/Library/Application Support/iWeb or, as I do, in a folder named iWeb in the Home folder.
    Create a folder for each website, give it a suitable name and paste the Domain.sites2 file with all the websites into each.
    Open each one in turn, double click the Domain.sites2 file to launch it in iWeb, delete all the sites except the one whose name is the same as the folder name, save and quit.
    Now you can launch any site individually in iWeb and sent a copy of the appropriate folder to the client.

  • When an email contains multiple attachments how can I forward just one of the attachments in a new email?

    I am new to IPAD use and need to forward one attachment from an original email that contains multiple attachments - how can I isolate and forward only one of the attachments?

    Aha! I have been doing just that. However, what has been tripping me up is that I am also used to clicking the Go Online/Go Offline toggle button on the top menu bar when I manually check for messages on Cox. Apparently when you take one inbox offline, that button switches to Off even though the other inbox is still online. If I just ignore that button and go on or off via the cox mailbox listing, it keeps comcast from being reactivated.
    Thanks so much for helping me think this through.
    Edited to add: I removed that dang button from my menu so I can stop clicking it.

  • How can I restore just one application from Time Machine?

    Hello, I have just one application that is really acting quirky and won't load correctly anymore and I would like to restore that application from Time Machine but am just not sure how to do that. Can someone please walk me through step by step on how to restore just one application. Thank you. Jean
    Message was edited by: anokienurse

    Before you restore an application from a Time Machine backup it would be wiser to remove the current installed copy then reinstall from the application's original distribution medium - download, CD/DVD, etc. The reason for this is that Time Machine backs up every hour. By now the bad version of this application is now backed up to your Time Machine backup drive. Restoring from the backup won't resolve your problem.
    First, uninstall the old program. If the program came with an uninstaller then use it. If not then start by deleting the application from the Applications folder. Then locate all the support files associated with the application and remove them, too. Look for these in:
    /Users/yourusername/Library/Preferences
    /Users/yourusername/Library/Applications Support
    Applications may come with a separate uninstaller program that could also be in your Applications folder. Some applications may install other files in other locations on your computer. If you tell us what the application is we may be able to provide additional help.
    You may find more information here: The XLab FAQs. Read the FAQ on uninstalling software.

  • How can I delete just one little picture from my new ipad2 ?

    This is my 1st Apple product an Ipad2. How in the world do you delete just one picture at a time??
    Thank you in advance.

    Only photos taken with the iPad, copied onto it via the camera connection kit, or saved from emails/wesites etc can be deleted directly on the iPad - either via the trashcan icon in the top right corner if viewing the photo in full screen, or via the icon of the box with the arrow coming out of it in thumbnail view. Photos that were synced from your computer are deleted by removing them from where they were synced from and then re-syncing.

  • How can i export just one mailbox from 10.6.8 mail in 10.9.2

    I’m using Mail in 10.9.2.
    I took the mail from 2 old POP a/cs and archived it in 4 (i.e. sent + received) folders under ‘On My Mac’.  Then, unfortunately, I deleted the contents of one of those folders.
    I have a backup of the emails, but it is in an old version of Mail, in 10.6.8.
    How can export the mail for that one folder and import it into the current Mail in 10.9.2?  And will it be compatible?
    I’m running Mavericks on a MBP from an external FW800, and 10.6.8 is on the internal drive.

    Nothing for 'Export' appears under Help in Mail for 10.6.8 - but it turns out that it's the terminology that's changed. 
    Creating an Archive of a mailbox provides the way to export it.  Thanks for your suggestions, Tony.  All sorted.

  • How can I get just one menu?

    Hi,
    I hope there is a way to have just one menu, the main menu, and to have two buttons on it: one for one chapter, one for the other, not one for playing the whole movie, one for playing individual chapters. Is there a way to do that? Is there a (simple, straightforward, no frills, non-garish, NO MOTION) theme that has that setup or that can be adapter for that use?
    (I currently use Brush Strokes and I have to kill the motion every **-***** time, yet varying amounts of motion ALWAYS appear until I slide the motion duration slider all the way to the right (max) and then back all the way to the left (min/0). (Yes, I have saved a version of that theme with no **** motion but it still appears despite that.) I DO NOT WANT ANY MOTION or sound effects if I am going to use any other theme than Brush Strokes. I can kill the motion and sound but I don't want one that has a garish look or has lots of motion initially.)
    Is there a way to use the map to eliminate the second-level menu or makeit the main menu? And if there is, would I be able to add/change the main menu buttons to that they start each chapter, not play the whole movie or play individual chapters?
    Thanks so much.
    John L

    Hi
    Not so interested in bad language. Struggling to get my own understandable.
    To do what I guess You want, only way I can think of is:
    - Make each chapter as a stand alone movie
    ∆ This by: selecting clips in iMovie that belongs to Chapter one
    - Export as Full quality QT.mov BUT - remember to mark - selected clips only
    - Now select the rest (or Chapter two) and export this
    Now You just drop Your Chapter one and two into a new open iDVD theme
    window.
    To make iDVD to handle both a full movie and specific Chapters alone has
    not been implemented in an easy way - but has to be a double material
    project. Which is not so economical. Only alternative in my mind is
    DVD-Studio Pro - and this hurts even more "economicaly"
    Yours Bengt W

  • How to retrive more than one row value from table

    hi,
      I had create one table if i entered value in more than one row, the second row override the first row value and while printing it in flat file i am getting the second value entered twice.
      i created one context for each column.
        plz provide me a solution..........
           very urgent..........
            Regards,
            Kiruthika

    Hi,
    Create seperate element for each row and then set values.
    for(int i=0;i<4;i++)
    IPrivate<view name>.I<node name>Element element = wdContext.node<node name>().create<node name>Element();
    wdContext.node<node name>().addElement(element);
    element.set<Att>();
    to retrive:
    int s=wdContext.node<node name>.size();
    for(int j=0;j<s;J++){
    wdcontext.node<nodename>.getnodeelementAt(j).getAttribute();
    Check this link about tables
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4
    Regards,
    Vijayakhanna Raman

Maybe you are looking for

  • Why can't I connect more than one computer to my wifi?

    It will allow me to connect one at a time, but I have to take one off in order to connect the other.

  • Photoshop crashing after this update, anyone know a fix?

    Process: Adobe Photoshop CS3 [2065] Path: /Applications/Adobe Photoshop CS3.app/Contents/MacOS/Adobe Photoshop CS3 Identifier: com.adobe.Photoshop Version: 10.0.1 [10.0.1x20071012 [20071012.r.1644 2007/10/12:09:30:00 cutoff; r branch]] (10.0.1) Code

  • How do I keep originals while deleting duplicates recently importing into iPhoto 11?

    Installed iPhoto11. All previous photos were missing. Imported from previous system iPhoto9. Resulted in inordinate duplicates.How can I keep the previously organized originals and delete the duplicates that ended up with over 55000 photos? Please he

  • Playing local sound file

    I need to play an mp3 file in my AIR app. But I won't necessarily know the path to the file because I need to use things like the storage directory. So, would I have to do something like this to get that done: var file:File = File.applicationStorageD

  • Report Builder won't install

    The exe starts fine and walks me through the setup screens. Then it goes down the list of items that it needs to do and when it gets to 'installing' it goes no further. I get 2 bars on the progess meter and that's it. I would love to be able to use t