How to use own paintComponent in DefaultCellEditor

Hello,
I implemented my own cell editor for checkbox. The code works, but I want to change the painting of the editor. How can I do this? Can I override the painComponent method of the checkbox in the CellEditor class?
(See my actual code below.)
Thanks!
import javax.swing.DefaultCellEditor;
import javax.swing.JCheckBox;
import java.awt.Component;
import javax.swing.JTable;
public class CheckBoxEditor extends DefaultCellEditor {
    JCheckBox component;
    boolean cellValue = false;
    public CheckBoxEditor(JCheckBox checkBox) {
        super(checkBox);
        component = checkBox;
    public Component getTableCellEditorComponent(JTable table, Object value,
                                                 boolean isSelected, int row,
                                                 int column) {
        if (Boolean.TRUE.equals(value)) {
            cellValue = true;
            component.setSelected(cellValue);
        else {
            cellValue = false;
            component.setSelected(cellValue);
        return component;
    public Object getCellEditorValue() {
        return ((JCheckBox)component).isSelected();
}

Can I override the painComponent method of the checkbox in the CellEditor class?Does the DefaultCellEditor class have a "paintComponent" method? You can't override a method if the class doesn't contain that method.
If you want to override the paintComponent(...) method of JCheckBox then you need to create a class with the following signature:
public class CheckBoxEditor extends JCheckBox implements TableCellEditor

Similar Messages

  • HOW TO USE OWN LOGO IN 'REUSE_ALV_COMMENTARY_WRITE'

    HELLO THERE ,
    CAN ANYBODY TELL ME HOW TO USE OWN LOGO IN 'REUSE_ALV_COMMENTARY_WRITE' ?
    I HAVE TRIED THROUGH THE TRANSCATION 'OAOR' AND 'OAER' , BUT I'M UNABLE TO DO IT. SO CAN ANYBODY PLZ TELL ME ANY OTHER WAY?
    REGARDS.

    Hello NEON BLUE,
    First step first upload u r log in the sap system using the below steps.
    1.  Goto the transaction OAER
    2.  Enter the class name as 'PICTURES'
    3.  Enter the class type as 'OT'
    4.  Enter the object key as the name of the logo you wish to give
    5.  Execute
    6.  Then in the new screen select Standard doc. types in bottom window
         Click on the Screen icon 
         Now, it will ask for the file path where you have to upload the logo
    7.  Now you can use this logo in REUSE_ALV_COMMENTARY_WRITE
    call the FM
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY       = Y_I_LISTHEADER[]
      I_LOGO                   =
      I_END_OF_LIST_GRID       =
      I_ALV_FORM               =

  • How to use own or other creditcard in Family Share?

    Hello together,
    i'm using the Family Sharing functionality(for example my dad set up the Family Share), great ideal. But now i want to buy an App on my own and do not want to use the Family-Creditcard but my own creditcard (sometimes i want to pay on my own).
    Each time i buy an App in the AppStore the Money is taken from the creditcard which is registered for Family Sharing.
    is there a way to decide which creditcard Shall be used for buying an App?
    if yes, were i have to change which creditcard shall be used?
    Or is there no function to decide and only the "Family" creditcard of my father  is used?
    please help,
    thankx

    you can't directly store a tree in a list.Ummm... Just to be contrary... Yes you CAN store a tree in a table.... In fact that's how the windows file system works.
    Having said that... you would be well advised to investigate tree data-structures before resorting to flattening a tree into a list.
    So... Do you have a specific requirement to produce a List? Your umming-and-erring about Vector vs ArrayList makes it sound like you're still at the stage of choosing a datastructure.
    Cheers. Keith.

  • Image and Archiving - OAD5  How to use own workflow insteard of TS30001128

    Hi,
    I'm on sap version 6.40
    By TC OAD5 SAP (Doc Type Customizing Wizard), instead of TS30001128,I want to use my own workflow to expend the approval process.
    Question is how to make my own workflow available in the value list(it only works when I copy it from those existing task/workflow in the list). Is there any specific requirement for the workflow input parameters?
    If that is possible, then we also want to used a workflow for those FI document which can not be parked.
    once image scanned, it will be pass to A. A will enter information in WebFlow form then forward it to B for approval. once it is approved, we will call a BDC method to post the document based on information in WebFlow form.
    my concern here is :
    when posting using BDC, how to attach the image to the document
    Since I am new here, is there any documentation about ArchiveLink workflow?
    Thanks for your help.
    Message was edited by: VVijay

    Hello K.,
    Thanks for posting back the answer, it always helps someone else
    Regarding the rest of your questions, I can only very strongly recommend against custom forms and BDCs! Unless you make it a multi-step process: Form -> Park by BDC -> review/complete -> Approve -> Post. But I don't know why you wouldn't be able to park - you only need a vendor, refrence and amount to park an invoice.
    The problem with forms is the lack of validation. With parked docs you'll always know that a tax code is appropriate for the G/L account and so on. With a poarked doc in workflow, you can control that it only goes for approval once it is technically complete (using 'save as complete').
    Regarding documentation, there's a fair bit of info about archivelink WF in the help, and also a few bits <a href="http://service.sap.com/archivelink">over here</a>
    Cheers
    Mike
    Message was edited by: Mike Pokraka

  • Rule Author-How to use own JSP screen instead of Rule Author Customization

    hi' I am using Oracle Business Rules and creating Rule Repository using Rule Author however
    I want to use my own JSP screen for customization of Rules instead of using Rule Author customization screen.
    please tell me how to do this.
    thanks
    Yatan
    Edited by: Yatanveer Singh on Jan 29, 2009 5:19 AM

    oracle provides API to edit rule repository programmatically. To use your custom JSP pages you need to write your wrapper classes over following oracle rule API classes:
    oracle.rules.sdk.editor.ruleset.Rule
    oracle.rules.sdk.editor.ruleset.RuleSet
    oracle.rules.sdk.editor.ruleset.Action;
    oracle.rules.sdk.editor.ruleset.AdvancedExpression;
    oracle.rules.sdk.editor.ruleset.Expression;
    oracle.rules.sdk.editor.ruleset.Pattern;
    oracle.rules.sdk.editor.ruleset.SimpleTest
    Once you create wrapper you can use them as pojos to build your custom rule author screen.

  • How to use own domainname with iCloud mail

    I want to use my own domainname email address with iCloud mail and not the iCloud address.
    This is important for my business. Can't use a @icloud.com for business.
    Thanks

    ON7FD wrote:
    How do they want to come into the business level within.
    They don't. iCloud, like MobileMe before it, is specifically targeted at personal users. If you want business email you would be much better off with a proper business service with a guaranteed uptime and properly accessible support.

  • How to use own created WebService in BPEL?

    Hello!
    I have a problem using an own created Web Service (a wsdl file) in BPEL Process Manager.
    At the moment I have a Java program which is getting values from SAP via SAPJConnector. From this Java program I generate an WebService File (wsdl) via Axis (on my local Tomcat Server).
    Now I want to use this own created WebService (wsdl file) in BPEL. I don't know how to bulid it to my BPEL Server so that I can use it in JDeveloper.
    Does anyone know what I have to do?
    Would be nice if someone could help me, because its very important
    Thank you

    Hi.
    Thanks for your reply.
    The way to invoke the WebService in BPEL Designer is not the problem i have.
    The problem i have is how to deploy my own created WebService (from a Java class with AXIS) to the BPEL server (OC4J).
    Do you know a solution for this?
    I described my Problem detailed in another thread "Thread: Issues Publishing Web Service to OJ4J"
    Tanks and Regards
    Benjamin

  • How to use own style sheet in user interface templates to change buttons, fields look

    I want to use my own style sheet to change the appearance of buttons, form fields etc. while applying my own user interface template. I know I can create an unstructured UI template to change logos, body color etc. but how do I apply css to buttons, fields generated by the portal components form wizard ?
    If this is not possible, how do I create my own form and get the same functionalities of a wizard generated form ?
    Thanks.

    Mrinal,
    I have solved that problem fortunately.
    What I did was to create my own unstructured user interface template. In the unstructured UI template, you can use style.
    for example, in between the <head> tags, write <style> tages and create own classes for buttons, textboxes etc.
    Then write a javascript to assign those classes to the buttons. Call the javascript function on OnLoad event in <BODY> tag.
    That will do the job.
    for example you have a style class called buttonclass for buttons.
    <script langauge=javascript1.1>
    function setstyle(form) {
    for (var i=0; i<form.length; i++) {
    if (form.elements.type == 'button') {
    form.elements[i].className = "buttonclass";
    </script>
    <BODY onLoad = "setstyle(document.forms[0]);">
    hope this helps.
    Mainak

  • How to use OWN logical database

    Hi all,
    hope somebody can help me.
    I copied a standard logical database (FPMF). The program which I use and have modified is also copied from standard.
    How can I assure that the program use MY logical database instead of the SAP-One?
    In my case I have some get statements. And these get statements all refer to FPMF and not to my copied database.
    Do anybody what's the probelm?
    Cheers
    Philip

    Yes, I know. And I am not happy with this solution.
    But I didn't see another way for my issue.
    Thank you very much.
    Philip

  • How to use own created STYLE at SMART FORM

    Hi all,
    i am making a smart forms in which i want to use my own created STYLE even tough i already copied my style from the existing one and activate it it but when i m going to use it at SMART FROM,it give me  SMART FROM default style.i can't understand what is the issue and why it is not showing in smart form even i have already activate it.
    Thanks & Regards,
    sappk25

    Thanks every body,i have resolved it by my own self.
    Thanks & Regards,
    sappk25

  • New bt infinity with HH5. How to use own router?

    Hi guys,
    I have just this morning had my infinity 2 installed. Went with BT as I had read it's very easy to use your own router.
    My engineer has just left. I was expecting an openreach modem, but didn't realise HH5 had the modem built in. No problem, must be very similar to my old virgin superhub, combo device. I'll putt he home hub into modem only mode right?
    Nope, can't see such an option. Is there anyway I can get around this? Will be a deal breaker for me!
    Thanks

    At worst you can buy a HG612 from "a well known auction site"
    If you found this post helpful, please click on the star on the left
    If not, I'll try again

  • How to use own style sheet

    Hi my friends,
    I created a JSP file that contains a report built using Reports Builder. When I run this page using a browser, my report is displayed correctly, including the style imported from Report Builder. But when I try run this page as a portlet, my report is being displayed, but style sheet is not being displayed. Why this is happening?
    Someone could help me?
    Thanks.

    Hi my friends,
    This page should use style css/wine.css, for example, but it is not doing this when I put it as a portlet. How should to stay my provider.xml file? When I must put the css directory?
    Thanks,
    Carla.

  • How to use own UOM conversion for PO creation...

    Hello Experts,
    We have a requirement wherein we need to use our OWN UOM conversion(UMREN and UMREZ)
    instead of getting it in the inforecord or the material master. Currently we are using BAPI
    BAPI_PO_CREATE1 to create PO.
    Is there anything that I can do to make the PO creation bypass the inforecord and
    the material master UOM conversion. For example in ECC we have 1 CV = 10 EA. We want it to be 1 CV = 15 EA.

    Hi Guys,
    Any help? Any exits/BADIs/enhancement spots that I can use?

  • How to use own J2EE library withon WAR/EAR?

    Hi,
    I've written a servlet within a WAR that uses for example JCo-Conenction. For that. I've added com.sap.mw.jco as "Used DC" in the WAR-Metadata. Additionally, I've added the DC in the EARs application-j2ee-engine.xml
    <reference reference-type="hard">
      <reference-target provider-name="sap.com"
         target-type="library">com.sap.mw.jco</reference-target>
    </reference>
    Everything is fine so far. But now, I want to use a self-created J2EE-Library DC that is deployed on the server.
    I've added it to the WARs "Used DC"s as well and added it to the EARs application-j2ee-engine.xml. But the servlet is not loaded during deploy. It fails with the error "NoClassDefFound: <class i have in my J2EE-Library project>"
    is there anything more to do for self-created J2EE-Libs?
    kr, achim

    Marc,
    I've solved it already. I've added indeed the wrong DC ("libs/servicelibs" instead of "libs/servicelibs_j2ee"). Well, bad naming conventions, it was late and I have the flu...
    Anyway, thanks for supporting me, that all what I did was correct
    kr, achim

  • How To Use Your Own Router with Out Loosing Verizon's FIOS Services

    How to use your own router with Verizon’s FIOS Service
    First, you need a basic understanding of how FIOS works but unfortunately there are two types of FIOS systems out there. All of the systems utilize a fiber optic cable to bring TV, phone and internet to your location over one optic cable. In addition these systems provide interactivity including widgets, remote DVR, movies on demand and so forth via an IP (Internet Protocol) signal.  Your STB (Set Tip Box) requires both a video and IP signal. The IP signal is necessary for all of the aforementioned interactivity.  The fiber cable terminates at the Optical Network Terminal or ONT for short.  The ONT converts the optics into a digital signal that can be utilized by ones equipment.  From the ONT your video, phone and internet are provided to the location.  This is where things can differ as the internet signal can be provided via a coaxial (MoCA or Multimedia over Coax Alliance) or RJ45 Cat5 (Ethernet) cable.  It is important to identify and understand the differences of these two setups.  In my case I have my internet entering via Ethernet cable, which in my humble opinion makes things a heck of a lot easier.
    How does one tell the difference? In most cases it’s rather simple; just look at the Verizon’s router WAN (Wide Area Network) Port.  Does it have a RJ45 (Ethernet) or Coax (TV cable Cord) going to it? If the router’s WAN port doesn’t have a coaxial connector then one will need to convert the MoCA signal into a usable Ethernet signal that routers understand. The easiest way is to use Verizon’s router as a bridge. In this method the Verizon’s router simply converts the signal and passes it along to your own router. The challenge is to try to maintain the interactivity that FIOS TV provides. Because of this one needs to supply the IP routed signal back to the FIOS router.  There are multiple methods for doing this and I would recommend investigates which one make the most sense.   
    In my particular case the IP signal was provided by Ethernet.  Again there are various ways of installing one’s own router. The hardest is to utilize Verizon’s router as a bridge.  This setup requires configuring Verizon’s router as a bridge and also creating a VLAN (Virtual Local Area Networks). In addition one needs to set up their own router so it will work with the various routing tables and networks. For me this is too complex for the average person and it can be difficult to trouble shoot if something goes wrong. Please consider that Verizon will not support utilizing third party routers.   
    The easier method is to request an Ethernet signal (if you don’t already have one) from their ONT.  I would highly recommend getting your hands on a NIM or Network Interface Module. This device is used to convert Ethernet to Coaxial so it can be fed back to your STBs.  These can be purchased online and Verizon technicians can be a valuable resource with these sorts of acquisition.  At the very least they can point you to the right direction.  Once you have a NIM the rest is rather simple.
    Log into the current Verizon Router.
    Located the router’s MAC address and copy it down.
    Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.
    Look at your current device list, typically found on the home screen. Copy down your STB MAC and IP address.
    Example:
    IP-STB1
    Connection Type: Ethernet
    * IP Address: 192.168.1.100
    IP Address Allocation: DHCP
    *MAC Address:                07:73:fFe:ad:8b:3f
    * Things you will need to write down
    Go to the network section and look for the main Ethernet connection.  Select this and then select more setting, typically found at the bottom. Release the current lease.
    Remove the Verizon router
    Install your router
    Connect the NIM by plugging in an Ethernet from one of the routers LAN (Local Area Network) ports to your NIM. Then connect the coax cable, the same cable that was used by Verizon router.
    Set you DHCP routing IP pool to accommodate Verizon’s STB IP’s  (note their IP’s start at 192.168.1.100)
    Go to DHCP section and reserve the STB IP’s by inserting the IP’s and MAC addresses. This shall ensure that nothing else utilizes the same IPs as the STBs thereby preventing IP address conflict.  
    Add the port forwards from Step 5 above.
    Clone Verizon’s Mac Address utilizing the info from step 2
    Finish setting up the router in typical fashion.
    Unplug and re-plugin your STB’s and test functionality.  It’s best to try using a widget or Movie on demand function.
    Note: if the new router can net get an internet signal contact Verizon’s support and have them release the IP and reset the ONT.  
    EVERYTHING should be working at this point.

     3 Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.G
    Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
    whatever, the STB's start at 192.168.1.100 and icement by 1 for each
    the port addr's will be 63145 alo incrementing by 1
    there is 1 entry for each in my pf list
    however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
    For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
    Why do you clone the mac addr??

Maybe you are looking for

  • Missing driver for "Base System Device"

    Hi, I have a N200 (0769) with WIN7 (32 bit). In the Device manager I have two "other devices" with missing drivers named "Base System Device". I could'n find any of that. I try looking for the Hardwar IDs: PCI\VEN_1180&DEV_0592&SUBSYS_382C17AA&REV_0A

  • AccessControlException: access denied

    I got a VERY simple client-server prog. On localhost it is working great...once you try to execute the client on other computer I get: "AccessControlException: access denied (java.net.SocketPermission, IP:5000 connect,resolve)" Actually it is a very

  • Mountain Lion vs. Itunes.

    Finally got my Imac to start and now Itunes won't run. Can you help me there?

  • Assistance with Query

    All... I'm looking for assistance on a query that is running for a significant period of time - I have taken this query over from a colleague who is no longer available, I am relatively new with SQL  but a quick study - I have made the adjustment to

  • MacBook/iMac and two Factor trusted device

    Hi Guys, Is it possible to have a MacBook Pro as a trusted device for two factor authentication? I am signed into iCloud and 'Find my Mac' on my MBP, however it is not displaying along side my iPad and iPhone as a potential trusted device. Googled ab