How to make JTable editable by me but not by the user?

Hi. I am doing an application to show data in a JTable.
I need to update the data but do not want the user to change the data.
Could somebody tell me how to do it?
Thanks a lot!

Yes, the above solution is clean. To add a little bit, if you donot want to have a JDialog to your application, just check for the password that is sent in an argument at the start of the application.
java MyApp <password> // to be run by you
java MyApp // to be run by user
This would check the password and then sets the edit mode for the table. (But mind you, this can be done only at the start). If you want to determine the editing mode during the runtime, then you have to go for a login dialog. But, as far as I can imagine, you develop the application and will give it to the user. Is that correct?
Thanks,
Kalyan

Similar Messages

  • Got a new LG in Anchorage and was told Glennallen, AK is in a service area.  Got home and all I get is Message 41, Roaming. Can make calls with WiFi connection but not on the road. Any idea whats going on?

    Got a new LG in Anchorage and was told Glennallen, AK is in a service area.  Got home and all I get is Message 41, Roaming.
    I can make calls with WiFi connection but not on the road. Any idea whats going on?

        Oh no! I'm sorry to hear you had problems in the are you're in AkJohnDye. I checked your coverage and I do see we have an extended 4G coverage. This means you're able to use your phone but it needs to be activated in a 4G LTE Verizon Wireless coverage zone. I apologize.
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • How to make front panel-text visable but not selectable

    Hi,
    I am trying to overlay text over a LED (control) on my front panel. But now I can not control the LED status anymore because the text is now on the top layer and the LED control is not. I like it to be still visable, but I need to be able to select the underlying control. Is this possible?

    Hi Remko,
    why do you use a LED as control? It is meant to be an indicator…
    Boolean controls also have boolean text - you need to make it visible in the control properties. Now you can write any text "over" your control without disabling it's usage!
    @Potterton: Welcome to the forum!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to u set your alarm clock but not have the phone or txt go off

    Hi, My old phone Blackberry had an alarm. I would set it and then shut the phone off. The phone would turn itself on when the alarm had to go off.
    IPone 4 will not do that. So, how do I set the alarm and not have the phone ring or get text alerts. I cannot figure out how to do this.
    How do you delete pictures that are not on the camera roll there is a garbage can for those but not for other picture. I have double from synching too many times, this is my first Apple and I am not finding it easy to use.
    Thank you

    lumpy53 wrote:
    If you turn on the mute switch on it will still vibrate when you get a call or text.
    You can select whether or not it will vibrate when the mute switch is engaged. Settings>Sounds>Silent. Turn Vibrate on or off.

  • How do you create a new iMovie but not erase the old one?

    I've been working on this iMovie for fun and I got an assignment to make a movie, but I don't want to delete my old movie. What do I do?

    You don't have to remove your project. Just make a new project. They'll both be stored in the iMovie Ptojects folder and can both be accessed from the project library in iMovie. Perhaps you mean something else and I'm not understanding the question.

  • How do I compare two csv files and not disable the user if the username is found in the 2nd file using powershell?

    Hi Guys
    I have two csv files with the following headers and I need to import both files into the script to check whether the StaffCode is present in the Creation/Renewal of Contract csv in a DisableAccount Script so I can stop any action to disable the account as
    the staff has renewed the contract with the company so the account should not be disabled.
    However my accounts are still being disabled. I am not sure now to construct the query so that it detects that the account is to be left alone if the staffcode is present in both files
    I does recognize that the $staffcodeN in the renewal file matches the $staffcode in the termination file
    but still proceeds to disable or set an expiry date to the account anyway based on the termination file. 
    How do I stop it from doing that?
    1)In the Creation/Renewal of contract file the following headers are present
         -  TranCode,StaffCode,LastName,FirstName,SocialSecurityNo,DateJoin,Grade,Dept,LastUpdateDate,EffectiveDate
    2)In the Disable of contract file the following headers are present
        - TranCode,StaffCode,LastName,FirstName,SocialSecurityno,LastDateWorked,Grade,Dept,LastUpdateDate,
    My data is not very clean , I have a-lot of special characters such as = , ' ,/ and \ characters to remove first before i can compare the data
    Thanks for the help in advance.
    Yours Sincrely
    Vicki
    The following is a short snippet of the code 
    $opencsv = import-csv "D:\scripts\Termination.csv"
    $opencsv2 = import-csv "D:\scripts\RenewContractandNewStaff.csv"
    foreach ($usertoaction in $opencsv) 
    $Trancode = $usertoactionTranCode
    $StaffCode = $usertoaction.StaffCode.replace("=","").replace('"','')
    $LastName = [string]$usertoaction.LastName.Replace("/","\/").Replace(",","\,")
    $FirstName = [string]$usertoaction.FirstName.Replace("/","\/").Replace(",","\,")
    $socialsecurityno = $usertoaction.SocialSecurityNo.replace("=","").replace('"','')
    $DateJoin = $usertoaction.DateJoin.replace("=","").replace('"','')
    $LastDateWorked = $usertoaction.LastDateWorked.replace("=","").replace('"','')
    $Grade = [string]$usertoaction.Grade
    $Dept = [string]$usertoaction.Dept
    $LastUpdateDate = $usertoaction.LastUpdateDate.replace("=","").replace('"','')
    $AccountExpiry = [datetime]::Now.ToString($LastDateWorked)
    foreach ($usertoaction2 in $opencsv2) 
    $TrancodeN = $usertoaction2.TranCode
    $StaffCodeN = $usertoaction2.StaffCode.replace("=","").replace('"','')
    $socialsecurityNoN= $usertoaction2.SocialSecurityNo.replace("=","").replace('"','')
    $DateJoinN = $usertoaction2.DateJoin.replace("=","").replace('"','')
    $GradeN = [string]$usertoaction2.Grade
    $DeptN = $usertoaction2.Dept
    $LastUpdateDate = $usertoaction.LastUpdateDate.replace("=","").replace('"','')
    $EffectiveDate = $usertoaction.EffectiveDate.replace("=","").replace('"','')
    $LastName2 = [string]$usertoaction2.LastName.Replace(",", "").Replace("/","").trim()
    $FirstName2 = [string]$usertoaction2.FirstName.Replace("/","").trim()
    # Use DirectorySearcher to find the DN of the user from the sAMAccountName.
    $Domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
    $Root = $Domain.GetDirectoryEntry()
    $Searcher = [System.DirectoryServices.DirectorySearcher]$Root
    $Searcher.Filter = "(sAMAccountName=$samaccountname)"
    $doesuserexist1 = $Searcher.Findall()
    if ($doesuserexist1 -eq $Null)
    {Write-Host $samaccountname "account does not exist"}
    elseif ($StaffCodeN -match $staffcode)
    write-host "user has renewed the contract, no action taken"
    else
    if(($lastupdatedate -ne $null)-or($LastDateWorked -ne $null))
                        write-host "Setting Account Expiry to"$accountexpirydate
    #$ChangeUser.AccountExpires = $accountexpirydate
               #$Changeuser.setinfo()
    if ($UserMailforwarding -ne $null)
    #Set Account expiry date to Last Date Worked
    # $ChangeUser.AccountExpires = $accountexpirydate
    # $Changeuser.setinfo()
     write-host "staff" $displayname "with staff employee no" $samaccountname "has                          
    mailforwarding" 
    Write-host "Please disable the account manually via Active Directory Users & Computers and 
    Elseif ($accountexpirydate -lt $todaysdate)
    #disable the account

    Hi Vicki,
    This Forum has an insert-codeblock function. Using it will make your script far more readable
    Your script is missing some parts, it is impossible to follow the problem.
    You are performing the same string cleaning action on $opencsv2 for each element in $opencsv, when doing it once should suffice. Why not start it all by cleaning the values and storing the cleaned values in new arrays?
    The Compare-Object function is great, why not take it out for a stroll on these lists, it might just safe you lots of unnecessarily complicated code ...
    You are creating a new $Domain, $Root and $Searcher object each iteration, when doing it once should suffice. Probably not much of a time-saver, but every little thing contributes.
    Try pinpointing the problem by doing extensive logging, not only by writing which action was taken, but writing the inidividual information (variables, mostly) before evaluation occurs. Your if/elseif/else looks sound, so if it's still not doing what you
    want, the ingoing data must be different from what you think should be there.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Phone is not getting signal to make calls, sometime it works but not for the most part.  I can hear callers at times but they can not hear me.

    Hello.
    Looking for help on how to get a better signal when receiving and placing calls.  Phone got a little wet and is having hard time placing calls and receiving call.  Calls are breaking up most of the time but some times I have 4 bars and phone calls goes through just fine. Noticed phone is having troubling connecting to towers.  Get a call but caller can not hear me when I have only one bar showing on phone.  Phone does hit 4 bars sometime and phone call is clear.  Any suggestion., new phone still learning how to use.   Should I try to reset to factory settings???  Have read lot of negative comments on the web about doing this.  Trying all options before going to the Apple store.
    Thanks for any help or advice.

    I ended up getting a new phone, straight through Apple.  I called their technical support and went through all he basics again and they decided to replace it.  Was a pretty quick process - after defaulting and resetting the whole phone (about 2 hours),  I called them back to inform that there was no change, so they set up the order.
    I had to give my CC# so they could hold a charge on it (in case I didn't send my old phone bach, which they sent me a pre-posted package to send it in anyway).  Had a brand new iPhone 4S in my hands in 4 days, which was pretty decent.  I had uploaded everything previously to iCloud, so setting up the new phone was a snap.
    Only thing I really didn't like was they charged me almost 30 bucks for shipping or processing, or something.  Not so sure that should have been my responsibility after spending so much on a brand new product, only to have to have it warrantied after, like, a month.

  • How to make non-editable ComboBox in flex.

    Hi All,
       I defined ComboBox as below and I'd like to make this combobox to non-editable(readonly)
      <mx:ArrayCollection id="bb_list">
            <mx:Object data="" label="-Please Select-"/>
            <mx:Object data="Y" label="Yes"/>
            <mx:Object data="N" label="No"/>
            <mx:Object data="D" label="I Don't Know"/>
        </mx:ArrayCollection>
      <mx:ComboBox  width="152" id="broad" dataProvider="{bb_list}" change="bb_service()" editable="false" > </mx:ComboBox>
    Still it is displaying ComboBox where user can change value from this ComboBox, can anyone let me know how to make this ComboBox to non-editable.
      Thanks in advance.
    Regards,
    Sharath.

    I really don't understand what you're trying to do.
    In the ComboBox default state, you cannot type text into the non-drop-down portion.  If you set it to editable, then you can type text in the non-drop-down portion.
    But, in both of these situations, the user can still open the drop down and select a new value.
    Do you want to display a drop down, but not give the users the ability to select a new option?  If so, you might not be able to work something up by listening to the change event, although I would expect that to be non-conducive to good interface design.
    If you don't want to show the drop down at all, use a Text component instead of a ComboBox.
    You might also try disabling the ComboBox in order to prevent the user from interacting with it.
    If you can elaborate on what behavior you're expecting and why it is unexpected, that might help us point you in the right direction.

  • How to make subforms editable in ADOBE forms

    Hello All,
       The 'Pagination' for few of the subforms are editable, and for few of the subforms are not editable.
    Actaully i have to set the 'overflow' for one subform, but the whole pagination is dispaly mode.
    (i can edit pagination for other subforms).
    can someone help how to make it editable.
    Thanks in advance
    Best Regards,
    Amarender Reddy B

    Hello Amar,
    Can please explain the problem you are facing with more clearer words. I am unable to make out any thing from this post.
    You might have some problem with Pages. We have two type of pages body and master. If a perticular subform is there in master page you can not edit it on the body page.
    Regards,
    Vikash

  • How to make cell editable alv in WebDynpro for ABAP?

    I make Column editable ALV.(See under source code)
    But I can't make Cell editable ALV.
    How to make Cell editable ALV in WebDynpro for ABAP?
    and..how to get changed data?
    DATA: l_value TYPE REF TO cl_salv_wd_config_table.
      l_value = l_ref_interfacecontroller->get_model( ).
    * { EDITABLE
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_input_field     TYPE REF TO cl_salv_wd_uie_input_field,
            lr_column          TYPE REF TO cl_salv_wd_column.
      lr_column_settings ?= l_value.
      lr_column = lr_column_settings->get_column( 'TOTAL_COUNT' ).
      CREATE OBJECT lr_input_field
        EXPORTING
          value_fieldname = 'TOTAL_COUNT'.
      lr_column->set_cell_editor( lr_input_field ).
      DATA: lr_table_settings TYPE REF TO if_salv_wd_table_settings.
      lr_table_settings ?= l_value.
      lr_table_settings->set_read_only( abap_false ).

    the code seems to be correct....but where are you writing it?
    put the code in the wddoinit method and it should work.
    have a look at this article..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1

  • How to make field editable in Tcode WPED

    Hi,
    Its about upgrade of IS Retail from ECC5.0 to ECC6.0.
    For Inbound IDOCS coming from POS to SAP System, IDOCs which are in unprocessed category in WPER Tcode.
    Now problem is in Tcode WPED there is a transaction date field which is now non editable in ECC6.0
    I want to make it modifiable.
    Earlier in ECC5.0 It was editable.
    So how to make that field modifiable.
    Regards,
    Divya

    Thanks Chenna
    But that field is sometimes coming editable and sometimes not.....may be it depends on some condition.....but I want to make it editable always whenever an Inbound IDOC is in "To be processed" status in WPER tcode.
    Iam going in that screen where field is coming uneditable is:
    Tcode WPER -
    > Inbound IDOC processing---> to be processed idocs---> double clicking on Idoc Number (comes on WPED screen with non-editable fields in overview table).
    If I'm double clicking on that transaction date field it goes to the screen whcih shows Sales Audit Editor: Item list of aggregate sales.
    Suggest me how to make it editable.
    bye
    Divya

  • I want to remove the header and footer when printing from my mac, i can do this in the Page Setup on my PC but not on the Mac. I can do it each time I print but then it resets. How do I make a universal change?

    I want to remove the header and footer when printing from my mac, I can do this in the Page Setup on my PC but not on the Mac. I can do it each time I print but then it resets. How do I make a universal change?
    == This happened ==
    Every time Firefox opened

    Go to the "File" menu, then "Print." The window that appears will have three drop-down menus at the top.
    The first is labeled "Printer",
    The second is "Presets".
    The third is unlabeled but has "Copies & Pages" selected by default.
    Click on that third menu and select "Firefox" near the bottom of the list.

  • How to make separately editable blocks in one widget?

    How to make separately editable blocks (Width, Height, BGColor,...) in one widget?

    There's an example widget for a 5x5 table which allows you set the color of different areas differently.
    Download the sample files at the bottom of the MUCOW documentation page:
    MuCow Documentation
    The sample named 'Table5x5.mucow' sets different parts of the widgets to different colors.

  • How to make lookup editable

    Hi All,
    In my instance MTL_RELATIONSHIP_TYPES lookup is disabled for editing , how to make it editable?
    Any profile options?
    Please help
    Thanks,

    Verify you are not in read only responsiblity.

  • How do I download a home DVD video disk (-R) to iMovie where I can then edit?  I can download from a camera, but not from the disk.

    How do I download a home DVD video disk (-R) to iMovie where I can then edit?  I can download from a camera, but not from the disk.

    iPhoto pulls off new videos from my iPhone 5 just fine.  Does iPhoto automatically come up when you connect your iPhone?  If it does, you should see your iPhone under "Devices" in iPhoto and then can select the videos to transfer (select, then Import Selected), though that should happen automatically.

Maybe you are looking for

  • Output required in MS Excel from Reports Oracle 10g error with built in pac

    Hi All, Our requirement is to get matrix report output in MS Excel. For that i found a report online. However, im having issues with Built-in Package OLE2.obj_type. Below is the report log file: ******* Custom: Version : UNKNOWN Copyright (c) 1979, 1

  • WS addressing inside OSB Message Flow

    Hi There, We are trying to work with the ws-addressing structure inside the Message Flow of a Proxy Service, but i don't know how to define in the wsdl to see the structure of the ws-addresing in the Header, i need to see it to obtain some values in

  • Why do playlist created on device disappear when the device is plug on a Pc

    Why do playlist created on the iPad disappears when we plug the iPad into a pc

  • Erro Handling in ESB

    Hi All, I want to know how can we achieve error handling in ESB as we can handle in BPEL through Catch and Throw activity is there any way to catch the errors in ESB? Thanks in Advance Raju

  • Xmms-openspc not detected by xmms

    I compiled many versions of xmms-openspc and even though I get some files as openspc.so, openspc.la or libopenspc.*, etc in /usr/lib/xmms/Input, xmms never detects the plugin. Sexyspc is detected when the libraries are in /usr/lib/xmms/Input but sexy