JTreeTable+add a password field in it

Hi All
I was successful in writing a code for JTreeTable but now I want to add a password field in it which is editable by the users.
Any help would be appreciated...
Thanks
apoorva

Sorry for the long code that I pasted.
My issue is this :
a) I created a renderer and editor for having one column act as a password field.When I used this renderer and editor in a simple JTable it worked well but when i added the same to my JTreeTable code the editor worked fine(I guess!!!) cos when I typed something it showed as hidden characters but on hitting enter key the value would disappear (the renderer messing it up I guess!!! ) :(
Here is my renderer and editor for JPasswordField
public static class PasswordTableCellRenderer extends JPasswordField implements TableCellRenderer
public Component getTableCellRendererComponent(
JTable table,Object value, boolean isSelected, boolean hasFocus, int row,
int column) {
setText((value ==null) ? "" : value.toString());
return this;
public class MyEditor extends DefaultCellEditor
public MyEditor(){super(new JPasswordField());}
}b) Also the model I use for the JTreeTable extends AbstractTableModel and hence I override the getValueAt() method. I am not understanding how renderer/editor works with this getValueAt() method.
Hope I am a little clearer this time
Thanks
apoorva
Edited by: apugupt on Jun 20, 2008 8:16 PM

Similar Messages

  • When creating a fillable PDF form can I add a password to only selected fields?

    I am creating a fillable form which will require data entry from several different people before being returned to my office. There are certain fields on the form that need to be restricted to personnel in my office only. I have tried to accomplish this restriction many different ways but have been unsuccessful.
    The closest I have come to accomplishing this restriction is by adding a "For HRO Only" button which I can use to hide certain fields from personnel outside of my office and unhide the text field when the button is clicked. This would be perfect if I could add a password to the button. Unfortunately this is either not possible or I haven't figured out how to do it which means that personnel outside of my office can still access the fields with a click of a button.
    The only other way I have thought of to accomplish this restriction is to mark those fields as "read only" but it seems as though it would be very time consuming for personnel in my office to complete the form due to the fact that they would have to open "edit form",  open the properties for each field requiring their input, and uncheck "read only" for each one.
    Any help/options/ideas you can provide will be greatly appreciate. Thank you!

    Thank you so much for the quick response. This will be a huge help! I hate to be a bother, but can you tell me the steps to create the script or give me a reference/resouce to use? I have used adobe products quite a bit, but this is my first time creating a PDF Fillable Form that will be distributed for use by several people so I am a little lost.
    Also, I seem to be running into one more problem that I am hoping you can help me figure out. On the form there is a question for the recipient  to answer by checking one of two boxes, yes or no. Depending on the answer an action is initiated. This feature works perfectly, however the issue is that when the recipient choses "yes" he/she is directed to fill out four additional fields that I currently have set as "required", but when the recipient choses "No" the four additional fields are hidden yet still required. This becomes an issue when the recipient has completed the form and tries to submit the form. An error message pops up notifying the user there are required fields that are empty and must be completed before submission.
    My thought is (in a perfect world) one of these two options would be ideal:
    1. When the "No" option is chosen the four additional fields are changed from required to not required, or
    2. When the "No" option is chose the four additional required fields are autopopulated with NA.
    Either remedy would work just fine, however I am open to suggestions... Again thank you so much for your help with my previous question and thank you in advance for any information/help/advice you can provide in regards to my second question. 

  • Make a report column display as an editable password field.

    Hi Guys,
    - Apex 3.2
    - Report region, one of the columns represents a password.
    - Made that column editable ==> display as text-item.
    How can I make it display as a password field?
    If I add:
    type="password"to the element attributes (in column attributes), then it still displays as a text field. Show html source reveales it just adds a second type= attribute:
    <input type="text" name="f05" size="15" maxlength="2000" value="test" type="password" id="f05_0001" />Which still makes it display as text, not password...
    Appreciate any help on this.
    Toon

    Dan McGhan wrote:
    There is no "out of the box" solution for this. You'd have to do a bit of work. However, before we go down that road, I'm curious as to why you'd want to put a password field in a tabular form.
    It's a multi row insert/update/delete (tabular) form, and one of the columns represents a password.
    One row represents "an application". The column represents the application password.
    I actually have two of them (columns) + a process that verifies that the same value was entered in both.
    I'm suprised that this is not out-of-the box possible...
    It would be a very easy to just support the 'password field' type in the dropdown list that I have now used to make it a simple text field. No?
    Appreciate any assistance...
    Edited by: Toon Koppelaars on Jul 14, 2010 1:20 PM

  • Can I add a password to a PDF portfolio created from multiple emails?

    Hi,
    Does anyone know how I can add a password to a PDF portfolio that I created by converting several emails into a PDF?
    Thanks in advance for your invaluable help!
    -Matt

    When viewing a Portfolio the classic Tools Pane is not visible, so you cannot apply security in the usual way.
    Instead, open the properties dialog (menu > File > Portfolio Properties) and select the Security tab. Change the dropdown field to "password security" and the dialog box will appear to enter the permissions information.

  • Typing not showing up in password fields

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/837290]</blockquote>
    Hi folks,
    I have a strange one - I can type in a password into a password field in FF3.6.17, but the field stays blank (or sometimes a space shows up). The passwords are being passed to the sites, but no placeholders aren't showing up.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • How do I add a password where I never had one? All I can find is change password and that asks for an old password which I do not have.

    How do I add a password as user and administrator where I never had one? All I can find is change a password which asks for an old password to be entered and I do not have an old password.

    Just leave the old password field empty and enter the new password

  • Make a field encrypted like password field

    Hi,
    I want to make a text field encrypted like password field in find user form so that that filed comes as dot when a user enter that field. For that I made secret = true for that field. But after doing that the find user form is not working for that text field (search criteria). I think we need to decrypt that field as well to make the search functionality working. But I am unable to-do that.pleases help.

    In addition to secret = true, try to add noEncrypt = true on that Field.

  • Paste not working on many Apple password fields?

    All,
    Both Lion and iOS 5 don't seem to allow me to paste into the password field, making strong passwords and 1Password hard to use.
    Anyone else seing this behavior?
    (it's not 1Password, an ordinary paste doesn't work either).
    Thanks,
    Chris

    I had a similar issue and was unable to get BB Link to sign into my blackberry ID.  After trying numerous things including several reboots, reinstalls, disabling firewall etc... the following fixed my issue.
    1.  Complete uninstall of BB Link
    2.  Complete uninstall of BB Dektop Manager
    3.  Reboot
    4.  Run registry cleaner (CC Clean)
    5.  Reboot
    6.  Reinstall BB Link
    7.  Reboot
    8.  STARTED WORKING
    I was able to use BB Link to transfer the settings from my Torch 9850 to my new Z10 wihtout any issues.  However I did add all of my accounts to the Z10 first (4 email accounts-1 with calendar, facebook, twitter)
    Give that a try perhaps it will work.  I had nearly given up until i tried the complete removal and registry clean.
    Good Luck
    Rick

  • Skype name and password field stays blank

    I can't click on or type in the Skype name or password field. It just says like this: http://prntscr.com/80dv5c . I have 64-bit Windows 7.

    http://answers.microsoft.com/en-us/ie/forum/ie11-w​​indows_7/cant-type-into-website-boxes-in-ie11wind​... If typing in Interenet Explorer doesn't work, then you will not be able to type on Skype login window, as this window is created and managed using Internet Explorer engine installed on your computer. As you can see, there might be several causes of this misbehaviour, and you should look at any antivirus/protection software installed on your computer. Meanwhile you can try to make use of the “legacylogin” workaround, which should enable login to Skype using the old legacy login window. However, you will not be able to login using Microsoft account (email address). Quit Skype. Make sure that you don’t see any Skype.exe processes in Windows Task Manager. If necessary, then stop these processes. Open this folder on your computer: C:\Program Files (x86)\Skype\Phone\ You should see there the Skype application file (Skype.exe).  Right click on the Skype.exe file and select: Send to – Desktop (create shortcut). Right click on the newly created shortcut and select Properties and then the Shortcut tab. In the Target field you will see now: "C:\Program Files (x86)\Skype\Phone\Skype.exe" Click with your mouse on the text in the Target field and move your curser one space after the last quotation sign and add the text /legacylogin. The text in the Target field should now read: "C:\Program Files (x86)\Skype\Phone\Skype.exe"  /legacylogin Click OK to save the changes. Start Skype using this new shortcut. Try now login to Skype?

  • CMC asterisks in password field

    hi ,
    i tried to change the Administrator password from CMC , but whe ndonig so i just appended to the appearing asterisks in the password field as i only wanted to add to the last password.
    right now i cant log on .
    so does anyone know if the asterisks will refer to other character than the ones in the original password .....
    one other thing how can i recover a lost administrator password , incase i could'n't resolve the asterisk

    you can reset your Administrator password using the following :-
    login to your CMS Schema ( in ur database)
    find a table called CMS_INFOOBJECTS
    delete the row with the "ObjectsID" = 12
    and restart your server,,, now the Administrator password is null
    Note :-    NO GUARANTEE
    take a backup before you perform this opeation
    Good luck
    Amr

  • Implement my own password field

    I have implemented my own "password" field.
    I catch the before_action of the et_KEY_DOWN event, check for the delete and backspace, displays an '*' or clears the field and bubbleevent is false.
    my code is below.
    If pVal.CharPressed = 8 Or pVal.CharPressed = 46 Then
       pincode = ""
       oApp.Forms.Item(FormUID).Items.Item "pincode").Specific.string = ""
    Else
        oApp.Forms.Item(FormUID).Items.Item"pincode").Specific.string += "*"
        pincode += Chr(pVal.CharPressed)
    End If
    BubbleEvents = False
    My problem is that the cursor stays at the beginning of my field.
    How can I move it to the end of this field.

    anyway, how do you handle such features, as a:
    input of character in the middle of password ???
    for example:
    I want to type in my password "asdf" and I've made a typo and I'm sure, that I've forgot to type the "s", so in the password field, I have the "***"-"adf" thus, I move right after the first char and press the "s" (or copy/paste the string containing the "s" or whatever) ... what happends ? you add the "s" at the end of your pincode ... and ups, you have the "adfs" instead of "asdf" ...
    and more problems appear ... when:
    user marks (using mouse, or shift+movement_arrows) more chars, and inputs the desired char/string ...
    This was the reason ... why I'm using a linkedbutton, which opens new form, with empty editbox, to type in the password ... fully visible, ofcourse ...

  • Set MaxLength to Password field

    Hi All,
    I have developed small login window kind of application. I want to set maximam length for the password field. Narratively, I want to show the message "Password should contain upto 8 characters" if user types more than 8 letters. How to do that?
    You can view my code below
    import javax.swing.JPasswordField;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.event.CaretListener;
    import javax.swing.event.CaretEvent;
    import javax.swing.text.*;
    public class PassWord
        private JFrame fr;
        private JPanel panel;
        private JLabel userIDLabel;
        private JLabel passwordLabel;
        private JTextField userID;
        private JPasswordField password;
        int i=0;
        public void createFrame()
            panel = new JPanel();
            panel.setLayout(new GridLayout(2,2));
            userIDLabel = new JLabel("Userid");
            passwordLabel = new JLabel("Password");
            panel.add(userIDLabel);
            userID = new JTextField("Your UserID");
            password = new JPasswordField();
            password.setEchoChar('*');
            password.setColumns(8);
            /*password.addCaretListener(new CaretListener()
                public void caretUpdate(CaretEvent e)
                    i++;
                    if(i>=8)
                       password.exit(0);
            panel.add(userID);
            panel.add(passwordLabel);
            panel.add(password);
            fr = new JFrame("Authentication");
            fr.getContentPane().add(panel);
            fr.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            fr.setSize(200,200);
            fr.setLocation(300,200);
            fr.setVisible(true);
            fr.pack();
        public static void main(String args[])
            new PassWord().createFrame();
    }

    Sir,
    Remember that behind a swing control lives a Model.
    The most appropriate way to provide constraints (such as max length) is to build the constraint in to the Model itself.
    Text controls provide a getDocument() method which returns the Document (model) the control is associated with.
    You will notice that Document provides a method to add a DocumentListener to it.
    A DocumentListener added to a Document is notified of any changes made to the document.
    So, suppose your document has a max length of 8.
    When you receive notification of a change, you can check to see if this maximum length has been exceeded.
    If it has, you can, for example remove the extra characters from the model.
    There are probably other ways to do this - but remember that the Swing control is just a View of the underlying Model. The best way to enforce constraints is in the model.

  • Switch from List of user to username and password fields?

    I have my Login Window to display a List of Users by default.
    Is there is shortcut key that switches to username & password fields so one can type in the username as well as the password?
    I googled it and I found something like "hold opt+return and click on any username", does not work though...
    I know that I can change it in System Pref. but it would be handy to know the shortcut key as well.
    Thanks.

    The "Option"-"Enter" trick should still work from the keyboard - use the arrow keys or type the first few letters of a listed name to highlight a username, then press "Option-Return":
    http://docs.info.apple.com/article.html?artnum=25686
    As I recall, to do the same thing with keyboard + mouse, the modifiers to be used when clicking did change between 10.3 and 10.4 so some of what you find on the web may be out of date.

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

  • Password Field not mapped between Request and Provisioning Form

    Hi to all. I'm working with OIM 11g. I've faced a strange issue. I'm not sure I'm working properly, so let me explain you my case. In my installation I've got the SSH connector, which is correctly connected with the physical resources. I've loaded the resource dataset ProvisionResourceSSH User bundled with the connector. Consider now that the user "goofy", with "ALL USERS" role, tries to make a request Provision Resource SSH User (Request Based provisioning). He fills in all the field in the appropriate manner, but when OIM triggers "Create User" provisioning task, after the required approval process, the password field is always blank (although goofy filled it in!!!).
    I've thought: "ok, it seems a role trouble". And effectively, if goofy has got also the role "REQUEST ADMINISTRATORS", the provisioning form shows the password field correctly valued (as goofy stated in his request).
    Note that all the fields are correctly mapped between request dataset and the provisioning form (I'm using the original dataset and the original provisioning form installed by the connector). So all other fields filled by goofy on the request form (request based provisioning) are correctly passed to the provisioning form. All the fields, except for the password.
    Am I wrong in something? How Could I make possible to pass the data filled on the request for the password field to the provisioning form even if the requester has not the role "REQUEST ADMINISTRATORS"?
    Thank you in advance for the help.

    This sure seems goofy! ;-) ... can you try making the ALL Users have all the permissions on the Resource Object and the Process Form and test it out? Also try from the backend at the database and see if the table has NULL for the password field? ... What's the type of password field in the dataset and the process form? Encrypted/Secret at both ends or mis match? Try making them plain text both the places as well.
    -Bikash

Maybe you are looking for

  • GL Account determination for new calendar year

    I notice in the SAP database that the GL account determination for 2010 has the accounts filled in as they came over from 2009, however in some of our clients's databases we had to manual enter them. Is there some setup we missed?

  • Can I use C code in labview?

    Hello, I've got a fairly complicated program I've written in C that requires two doubles to be passed to it and it spits out two integers as a result of a very detailed calculation. Is there a way to have labview call this C function? I've tried sear

  • Clueless - Method to get Object

    First of all I'd like to thank everyone in advance for any help. I am completely new to Java, and am making my first attempt at a program for an assessed project. The following code is something I am having trouble with: public class Train {      pub

  • Canon MF4150 over network on Windows 2000

    I've been searching but haven't found a solution for my problem, so I thought maybe someone could help. I'm running a Canon MF4150 laser printer on a Windows2000 server. The printer is shared out and can be accessed nicely through Windows machines on

  • Lyrics display wrong code

    When I use the software 'Tag&Rename3.2" or iTunes to edit lyrics(use ANSI or Unicode Code),the lyrics can display correctly in iTunes,but on the nano it display wrong code.I think the reason maybe the lyrics code is ansi code,but when I change it int