I cant modify my CheckTree Render to be a TableTree with Checkbox ?!!

hello everybody .. i am trying for 2 week to modify my code i wrote
(which allows me to have a tree with a checkbox ) to have a tabletree with checkbox for each node .. plz help .. this is my checkTree renderer
package com.kelk.cfg_util_gui;
/* swing1.1 */
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTree;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;
import javax.swing.tree.TreeCellRenderer;
* @version 1.1 04/24/99
public class CheckRenderer extends JPanel implements TreeCellRenderer {
     private static final long serialVersionUID = 1L;
     private Icon kelk = new ImageIcon("/com.kelk.cfg_util/Images/KELK32.gif");
protected JCheckBox check;
protected TreeLabel label;
public CheckRenderer() {
setLayout(null);
add(check = new JCheckBox());
add(label = new TreeLabel());
check.setBackground(UIManager.getColor("Tree.textBackground"));
label.setForeground(UIManager.getColor("Tree.textForeground"));
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean isSelected, boolean expanded,
boolean leaf, int row, boolean hasFocus) {
String stringValue = tree.convertValueToText(value, isSelected,
               expanded, leaf, row, hasFocus);
setEnabled(tree.isEnabled());
check.setSelected(((CheckNode)value).isSelected());
label.setFont(tree.getFont());
label.setText(stringValue);
label.setSelected(isSelected);
label.setFocus(hasFocus);
if (leaf) {
label.setIcon(UIManager.getIcon("Tree.leafIcon"));
//label.setBackground(Color.RED);
} else if (expanded) {
label.setIcon(UIManager.getIcon("Tree.openIcon"));
} else {
label.setIcon(UIManager.getIcon("Tree.closedIcon"));
return this;
public Dimension getPreferredSize() {
Dimension d_check = check.getPreferredSize();
Dimension d_label = label.getPreferredSize();
return new Dimension(d_check.width + d_label.width,
(d_check.height < d_label.height ?
d_label.height : d_check.height));
public void doLayout() {
Dimension d_check = check.getPreferredSize();
Dimension d_label = label.getPreferredSize();
int y_check = 0;
int y_label = 0;
if (d_check.height < d_label.height) {
y_check = (d_label.height - d_check.height)/2;
} else {
y_label = (d_check.height - d_label.height)/2;
check.setLocation(0,y_check);
check.setBounds(0,y_check,d_check.width,d_check.height);
label.setLocation(d_check.width,y_label);
label.setBounds(d_check.width,y_label,d_label.width,d_label.height);
public void setBackground(Color color) {
if (color instanceof ColorUIResource)
color = null;
super.setBackground(color);
public class TreeLabel extends JLabel {
     private static final long serialVersionUID = 1L;
     boolean isSelected;
boolean hasFocus;
public TreeLabel() {
public void setBackground(Color color) {
     if(color instanceof ColorUIResource)
     color = null;
     super.setBackground(color);
public void paint(Graphics g) {
String str;
if ((str = getText()) != null) {
if (0 < str.length()) {
if (isSelected) {
g.setColor(UIManager.getColor("Tree.selectionBackground"));
} else {
g.setColor(UIManager.getColor("Tree.textBackground"));
Dimension d = getPreferredSize();
int imageOffset = 0;
Icon currentI = getIcon();
if (currentI != null) {
imageOffset = currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
g.fillRect(imageOffset, 0, d.width -1 - imageOffset, d.height);
if (hasFocus) {
g.setColor(UIManager.getColor("Tree.selectionBorderColor"));
g.drawRect(imageOffset, 0, d.width -1 - imageOffset, d.height -1);
super.paint(g);
public Dimension getPreferredSize() {
Dimension retDimension = super.getPreferredSize();
if (retDimension != null) {
retDimension = new Dimension(retDimension.width + 3,
                    retDimension.height);
return retDimension;
public void setSelected(boolean isSelected) {
this.isSelected = isSelected;
public void setFocus(boolean hasFocus) {
this.hasFocus = hasFocus;
}

my code i wrote did you really?
this fellow here wrote something similar
http://www.objects.com.au/java/examples/src/tree/CheckRenderer.java
perhaps you can swap notes.

Similar Messages

  • I cant send mms since i updated to ios 8 with wind mobile

    i cant send mms since i updated to ios 8 with wind mobile

    Hey beastlyhippo,
    Thanks for the question. Based on what you stated, it seems like you are having trouble with MMS messages. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    iOS: Troubleshooting Messages
    If you can't send and receive MMS
    You will need these to send and receive MMS:
    An iPhone 3G or later
    iOS 3.1 or later
    A cellular data connection (MMS isn't available if you're using only Wi-Fi)
    A domestic MMS plan from your cellular provider. You might need an international messaging plan to send MMS to an international contact (Contact your carrier for more information.)
    A roaming MMS when using a cellular provider's network that is different from your billing cellular provider's network (Learn more about roaming and contact your carrier for more information.)
    To resolve issues with sending and receiving MMS, follow these steps
    Go to Settings and turn airplane mode off.
    Go to Settings > Messages and turn MMS Messaging on.
    Go to Settings > Cellular and turn Cellular Data on.
    Go to Settings > Cellular and turn Data Roaming on if you're roaming on a cellular provider network that is different from your billing provider's network.
    Make sure that you have a cellular data connection in the status bar of your iPhone.
    Go to Settings and turn Wi-Fi off. Open Safari and navigate to www.apple.com to verify that you have a data connection. Turn Wi-Fi back on to continue using Wi-Fi for other features. If your cellular data connection isn't available, follow these steps.
    Make sure that you can send and receive SMS. If you can't send and receive SMS, see the "Issues with sending and receiving SMS" section, above. MMS might not be available while you're on a call. Only 3G and faster GSM networks support simultaneous data and voice calls. Learn more about which network your phone supports.
    Restart your iPhone.
    Tap Settings > General > Reset > Reset Network Settings on your iPhone.
    Remove your SIM card and insert it again.
    If you still can't send or receive MMS, follow these steps
    Make sure that the contact trying to message you isn't blocked in Settings > Messages > Blocked.
    Go to Settings > Messages and turn on group messaging if you're sending a group message.
    Make sure that you're using the area code with the contact's phone number. When you send messages internationally, you also need the contact's international code.
    If you're using a "Pay as you go" MMS plan, make sure it has enough available balance. If you're unsure of your MMS plan or available balance, contact your carrier.
    If the issue occurs with a specific contact or contacts, back up or forward important messages and delete your current messaging threads with the contact. Create a new message to the contact and try again.
    If the issue occurs with a specific contact or contacts, delete and recreate the contact from the Contacts app. Send a new message to the new contact.
    Back up and restore your iPhone as new.
    If your carrier has recently ported your phone number, the porting process might not be complete. Contact your carrier to confirm that the porting process is complete.
    Contact your carrier to verify that you're provisioned to send SMS and are in an area with cellular coverage.
    Contact your carrier to verify that there aren't blocks or filters on your wireless account preventing you from sending SMS.
    Your carrier might require modified APN settings to use MMS.
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • My i pod touch was erased in the find my ipod app this has set my i pod where i cant do a thing but see a black screen with a rotating circle in the middle of the screen. i tryed to restore and itdosent download actual file to the i touch

    my i pod touch was erased in the find my ipod app this has set my i pod where i cant do a thing but see a black screen with a rotating circle in the middle of the screen. i tryed to restore and itdosent download actual file to the i touch and i cant do a thing with it please help me fix this and if thereis a way with out lossing my data would be great but however it can be done please let me know asap thank u.

    Take it to an Apple Store and they may take care of it for you.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • Cant use more than one authorization group per report with SBO CR Basic

    Cant use more than one authorization group per report with SBO CR Basic.
    I have installed on SAP Business One SBO 2007 SP00 PL49 the Crystal Reports Basic 2.0.0.7.
    i have defined two users, manager and supervisor.
    I have defined two groups, M and S.
    Manager belongs in managers (M), and supervisor is assigned to the supervisors (S).
    i enter to one report, disable the public option to enable group authorization, and then check M group.
    Manager can see the report, but Supervisor is not allowed. So far good.
    Then i uncheck M, then check S in the report properties, and Manager cant get in, supervisor opens the report, So far good.
    But when we check both Groups or more, only the M group authorization appears to work, and S group users cant acess, even the report is allowed for that group, also happens with all the groups appart the first (2nd, 3rd, 4th, etc.).
    It seems that a report can manage a single group, but i have to be shure to tell this to the customer.
    So far we have included all Manager users to the S group in order that only S group is used and authorized users can use, but this is duplicating user participation in groups, and it would be much easier to check the desired groups for a single report.

    Cant use more than one authorization group per report with SBO CR Basic.
    I have installed on SAP Business One SBO 2007 SP00 PL49 the Crystal Reports Basic 2.0.0.7.
    i have defined two users, manager and supervisor.
    I have defined two groups, M and S.
    Manager belongs in managers (M), and supervisor is assigned to the supervisors (S).
    i enter to one report, disable the public option to enable group authorization, and then check M group.
    Manager can see the report, but Supervisor is not allowed. So far good.
    Then i uncheck M, then check S in the report properties, and Manager cant get in, supervisor opens the report, So far good.
    But when we check both Groups or more, only the M group authorization appears to work, and S group users cant acess, even the report is allowed for that group, also happens with all the groups appart the first (2nd, 3rd, 4th, etc.).
    It seems that a report can manage a single group, but i have to be shure to tell this to the customer.
    So far we have included all Manager users to the S group in order that only S group is used and authorized users can use, but this is duplicating user participation in groups, and it would be much easier to check the desired groups for a single report.

  • Hey, I Upgraded from 7, to 8. I'm using a Powerbook G4, with Mac OS 10.5.8, MY question is: im unalble to click on the channel strip to add plugins. actually, I cant click on a lot of options, mainly things with scroll down menus ie... busses, aux.. HELP!

    Hey, I Upgraded from LOGIC 7, to 8. I'm using a Powerbook G4, with Mac OS 10.5.8, MY question is: im unalble to click on the channel strip to add plugins. actually, I cant click on a lot of options, mainly things with scroll down menus ie... busses, aux.. HELP!

    Hey, I Upgraded from LOGIC 7, to 8. I'm using a Powerbook G4, with Mac OS 10.5.8, MY question is: im unalble to click on the channel strip to add plugins. actually, I cant click on a lot of options, mainly things with scroll down menus ie... busses, aux.. HELP!

  • Anyone know why i cant upgrade to newer version of itunes , its coming with an error "ITUNES64.MSI FOLDER containing the installation package is missing ??

    anyone know why i cant upgrade to newer version of itunes , its coming with an error "ITUNES64.MSI FOLDER containing the installation package is missing ??Ive tried unistalling previous version but same message comes up

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • HT201441 if the previous owner it s not present and i cant contact the previous owner what can i do with my iphone?

    if i cant contact the previous owner what cand i do with my iphone 4 locked icloud?

    Welcome to the Apple community Axel.
    Unfortunately, you cannot do very much with your phone unless you get assistance from the previous owner, they should either provide you with the password to unlock it or remove their account from the phone entirely remotely through iCloud.com > Find My Phone.

  • 2 questions, what do i do when a audio book i purchased is not in purchased menu for re downloading for my account, or why cant i re download the book from iTunes store with out paying for it after support they told me i could.

    what do i do when a audio book i purchased is not in purchased menu for re downloading for my account, or why cant i re download the book from iTunes store with out paying for it after support they told me i could.
    i tried to re download a purchased audio book after i contacted apple support team for iTunes they said it would be ready for re download or they said id have to re download it from iTunes store i cant remember, so i tried both couldn't re download it from purchased menu and the book id have to re download from iTunes store costs money as if i have never purchased what do i do? I don't have any warranty any more or money to purchase another warranty.

    Babowa
    Thank you for your prompt reply.  I have bought 1 MacbookPor 17, 1 Macbook air, 1 MacbookPro 15 , 2 ipads, 3 iphones, and this iMac27 and 2 of iMAC24 or 20 not sure   but I do not recall ever doing what you are telling me in your reply.   When you get a extended car warranty, you don't   sign up for it.. it is just there and is included in the sale.   You don't buy this warranty to use it.. You buy it, in case something happens.   Here a perfect iMAC with minimum 100 hour useage has a dead drive.  That is not normal and I should not have to even be requesting anything since most MFG offer a 3-5 year warranty on their disc drives and I believe that is probably passed on to Apple regardless if an extended warranty is purchased or not.   Customer service dictates a more flexible approach to make sure the lifetime value of a customer is not lost due to some misunderstanding.
    I was in the MacStore that I purchased the unit..and they found and pulled the invoice and confirmed
    the purchase of it in front of me.  I had paid with credit card and fortunately it was there in their system.   I do not also recall recieving any box or paper although most everything I ever get remains sealed.. I am not in the habit of opening anything since I have never encountered any serious issues before.
       I have used my Macbookpro warranty 1 time  and that is all throughout the years I have been investing in Apple equipment.
    I just recieved a letter from the store asking me to get the paper to them so they can register it... I don't recall getting any paper actually.  But I do have several boxes sealed here..  On this iMAC27, it was a hurry up and get it done thing and I don't remember taking anything extra with it.   Regardless,  my request does not seem unreasonable.
    Thank you

  • HT201328 I CONTACTED WITH THE CARRIER BUT THEY SAID BECAUSE I GOT THIS IPHONE MOBILE SET FROM THE INSURANCE COMPANY SO THEY CANT UNLOCK THE SET, THEY TOLD ME TO CONTACT WITH THE APPLE

    I CONTACTED WITH THE CARRIER BUT THEY SAID BECAUSE I GOT THIS IPHONE MOBILE SET FROM THE INSURANCE COMPANY SO THEY CANT UNLOCK THE SET, THEY TOLD ME TO CONTACT WITH THE APPLE

    WHY ARE YOU YELLING AT US!
    You are not addressing Apple here, just users like you.
    Go here, find the number and call Apple:
    http://support.apple.com/kb/HE57

  • How to create a form where one user cant modify information entered by another user.

    First time using Acrobat. Very newbie on this. Company wants me to create forms.  As an example, new hire form where HR sends form to one department, they write in information as to what the user needs, etc. Then they send form to another department and thent they add comments or whatever to the same form
    What we want to accomplish is if the form is being sent from one person to another and each person adds information we want the infornation that was inputted locked so that other people cant edit it.
    Is this possible? Thanks for any input.

    If they're using Acrobat there's no real way of doing that. If they're using Reader, though, you can set the fields as read-only. It's far from a secure solution, though.

  • Cant modify volume of seperate Speak

    Hi!
    I've got the Audigy 2 NX and a 5. Surroundsystem.
    I installed all the drivers and MediaSource-Things (in fact pretty much everything I found on the creative site for 2 NX).
    But I miss the option to modify the volume of every single speaker seperatly. E.g. my left rear speaker is not as near as the right one, so I'd like to increase its volume.
    Is there any chance to do that?
    I know that there is the possibility to do it with the Soundblaster Li've! 24bit External so I wonder why it's not with the 2 NX.
    Greets,
    Juro, Germany

    Juro wrote:
    this is my speakerpage:
    http://www.webhide.net/speakermanagement.jpg
    (Its in German, "Lautsprecher" means "Speaker").
    There's no chance to calibrate anything.
    I dont have a THX-Console either. I just wrote an email to the support, I hope they know what to do.
    Greets, Juro
    Below is a list of software which can be installed by patching the installation file using ctcomp. Ctcomp modifies the installation compatibility database (data.dat) the way, you (perhaps) be able to install
    - Audigy 2 ZS drivers and
    - below mentioned software
    to (supposeingly) all card models listed below.
    I do not know if this is 00&#37; possible/true for all models listed, because I have not tried install these drivers/software to any other model but for Audigy 2 (SB0244) and everything else, but Graphic EQ works straight away. Patch for EQ can be found on Driver Heaven forum.
    !!! As for the original poster --> no mention of Audigy NX there --> ;(. You can ask DVDKingdom to add your card on supported cards list (if it's possible to install this software for your card).
    [Component.List]
    000 = MINIDISC, 2500000, ..\\MiniDisc
    0002 = DIAGNOSE3, 5500000, ..\\Diagnose
    0003 = WAVESTUDIO, 3500000, ..\\WStudio
    0004 = SFBANK_MGR, 4000000, ..\\SfbMgr
    0005 = SPKR_CALIBRATOR, 9500000, ..\\SpkCal
    0006 = EAX_CONSOLE, 8000000, ..\\EaxCon
    0007 = SURROUND_MIXER, 7500000, ..\\SurMixer
    0008 = SPEAKER_SETTINGS,7500000, ..\\SpkSet
    0009 = ASR2, 7500000, ..\\Asr
    000 = GS_DEMO, 25000000, ..\\GSDemo
    00 = RESTORE, 3500000, ..\\Restore
    002 = AUDIOHQ, 2000000, ..\\AudioHQ
    003 = DVDAUDIO, 2500000, ..\\DVDAudio
    004 = THX_CONSOLE, 2500000, ..\\ThxCon
    005 = SYSINFO, 2500000, ..\\SysInfo
    006 = GRAPHIC_EQUALIZER, 2500000, ..\\CTEq
    007 = MIDISAMPLE, 40000000, INTERNAL
    008 = SFBANK, 5000000, INTERNAL
    009 = MANUAL, 2000000, INTERNAL
    0020 = AUDIGYGUIDE, 800000, INTERNAL
    002 = WINDRV, 35000000, INTERNAL
    ;Remove component for each OS type and lang platform (i.e. ENG)
    [Component.Remove]
    JPN = 0009
    WIN98SE =
    WINME =
    WIN2K =
    WINXP =
    ;WIN95 =
    ;WIN98 =
    ;WINNT4 =
    [Component.UnSelect]
    [Component.Hide]
    WIN98SE =
    WINME =
    WIN2K =
    WINXP =
    Audigy 2 ZS Series : SB0360/SB0290, SB0350/SB0250 , SB0352
    Audigy 2 (NON-ZS) Series : SB0240/SB0250, SB0243, SB0242, B0244/SB0250/SB0280/SB0290, SB0245, SB0244, SB0320/SB0290, SB0249
    Audigy 2 LS : SB34
    Audigy : CT4820, CT0070, CT0072, SB0090, SB062, SB0092, SB06, SB092, SB09, SB009, SB0095, SB0230, SB023, SB0232, SB0238
    SBLi've! 5. : For SB0060, SB000, SB002, SB00, SB003, SB005, SB022, SB0222, SB0228, SB0226, SB0223, SB0229
    SBLi've! : For CT4670, CT4620, M002/M003, CT4780, CT40, CT4830, CT4832, CT4870, CT4872, CT483, CT487, CT4760, CT4850
    SBPCI 52 : CT4790, CT4820, SB050
    SBPCI 256 : CT4890, CT489, CT4893
    jutapaMessage Edited by jutapa on 0-28-2006 03:58 AM

  • How to lock the rows in a transaction so others cant modify the rows

    Hi,
    I want few suggestion in the following scenario .
    I have a few records ( say 100 ) in a table which Im sending to the client over a network and are populated in a swing GUI...Now the client selects few of them ( say 3 ) and submits to the server. Now the server should assign a number to those rows and store them in the database. As it is a multi client environment While assigning the number it should check that no other client has already assigned a number to at lease to one of the row in the meantime. in that case it shoudl fail.
    In this case i want to lock those 3 records when the request arrives at the server assign number commit and release the lock.
    I want to avoid deadlocks.
    Can any one suggest me whoch locking policy should i use and how ?
    Thanx in advance...
    Mahi

    It depends on how acceptable it is for your commit to fail. By far the easiest and safest thing to do is use Optimistic Locking. This way if the server tries to commit changes to something that has already been committed, an Optmistic Lock exception will be thrown. It's up to your application to handle this, and depending on your domain and the likelyhood of this happeneing, you could just tell the user "try again". The other option is pessemistic locking, which is very, very, dangerous (in my opinion). The main issue is that it's resource intensive, and different databases have different semantics on how it works.
    IIWY, I'd look at Optimistic Locking in the docs and go from there.
    - Don

  • Cant get anything to render from FCP X through Compressor

    Everything I send from FCP to Compressor gives the error 2045 after rendering.
    Can anyone help?

    You're using Compressor 4 right?
    I think there was and issue with the FX Factory plugin.  You can look in Library/Plugins.  If you see it just remove it and try again.
    You can also try exporting from FCPX to ProRes and manually running the ProRes file through compressor.  See if you get the same error.
    I think 2045 is just a generic compressor failed code.  Unless someone know what it means.

  • OS9 Clients on 10.5.4 Server. Connects but cant modify

    I have a few 9.2.2 clients on the network that have to be 9 due to legacy hardware. Anyhow the server is now 10.5.4 due to upgrade last week from 10.3.9. The OS9 clients now only see the server volumes and will mount them on the desktop but the icon is white not colored and the contents are unmodifiable. I get a file does not exist error every time I try to edit any file. I have DHCP turned on in the server and im connecting to the server via IP address in the TCP/IP settings. What am I missing?

    Connecting to the AFP Server from Mac OS 8 and Mac OS 9 Clients
    Apple file service requires the following Mac OS 8 or 9 system software:
    Mac OS 8 (version 8.6) or Mac OS 9 (version 9.2.2)
    TCP/IP
    AppleShare Client 3.7 or later
    To find the latest version of AppleShare client software supported by Mac OS 8 and
    Mac OS 9, go to the Apple support website at www.apple/support.
    Note: Apple file service does not support AppleTalk connections, so clients must use
    TCP/IP to access file services.
    To connect from Mac OS 8 or Mac OS 9:
    1 Open the Chooser and click AppleShare.
    2 Select a file server and click OK.
    3 Enter your user name and password, or select Guest and then click Connect.
    4 Select the volume you want to use and click OK.

  • My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore, can anyone help with this?

    My ipod touch is disabled, i installed the latest version of itunes, but cant figure out how to restore the ipod, can anyone help?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

Maybe you are looking for