How to set JSpinner not editable?
hi
I am using a jspinner - i would like the JSpinner to be enabled but i dont want the user to be able to edit the data inside the spinner.
I know in combo box when i had this problem i used:
setEditable(false)
but i dont see this function in the JSpinner.
How can i do it? does setting a null editor should help?
Liat
i m displaying data to table cells but problem is that they are Editable , any one can change the displayed info .
so how to stop other from editingIf you are using some custom table model, then override isCellEditable() and return false.
If you are making table by passing data and column names from the constructor itself, then you would have to change it to following to override isCellEditable():
JTable table= new JTable(new DefaultTableModel(data, columnNames){
@Override
public boolean isCellEditable(int row, int column) {
return false;
});Sorry, I don't know of any other shortcut method :)
Thanks!
Similar Messages
-
Set quotation not editable in webUI
Hi all,
i want to find ways to set quotation not editable in webUI according to quotation no when push EDIT button not SAVE button.
Is there any BADI to achieve this (i can get quotation no in the BADI) ?Hi Gang Li,
If it helps, I would try by implementing badi CRM_ORDER_AUTH_CHECK, with method CRM_ORDER_ADD_AUTH_CHECK. If after your checks there the user had no authorization to edit (iv_mode = 'B'), you can pull NO_AUTHORITY exception there.
Kind regards,
Garcia -
How to set Mail NOT to download new messages?
How can I set Mail NOT to automatically download incoming email messages when it opens?
I have several email accounts turned on within Mail. My default email is NOT iCloud, and I use another app to manage that account. However, within other apps, for example, to report a crash, the iPad defaults to Mail to send the report. That is OK. However, in the process it starts downloading all my incoming messages. I want it NOT to do that.
i want it to download new messages only when I ask it to do so.
Thanks.The iPhone data plans are unlimited, so you shouldnt be concerned about cost. That being said, it is ANNOYING to have all accounts (I have six) check email just because I launch the mail app. And if I follow a URL in an email to Safari, then come back to Mail, it checks AGAIN.
Nope, there is not way to stop if from doing that short of turning the account OFF under Mail Settings, which is even MORE inconvenient. I went to http://www.apple.com/feedback/iphone.html and left them a message. Perhaps you should do the same. -
How to make fields not editable in screen
Hi gurus,
I have a table and i need to make some fields not editable depending on the values of other fields of the table .
Example :
my table have these fields : begin_date, name.
If the begin_date < sy-datum --> then the field ' name' should not be editable.
Tankyou.Hi,
OK. I did some code and was able to get the results as you want. Created a table YTESTHV with two fields YYDATE and NAME. Generated a two screen maintenence for the table. Screen 2 - Overview screen, screen 3 Detail screen.
Overview screen.
PBO.
PROCESS BEFORE OUTPUT.
MODULE LISTE_INITIALISIEREN.
LOOP AT EXTRACT WITH CONTROL
TCTRL_YTESTHV CURSOR NEXTLINE.
MODULE LISTE_SHOW_LISTE.
MODULE DISABLE_FIELDS.
ENDLOOP.
MODULE DISABLE_FIELDS
move extract to YTESTHV.
if YTESTHV-yydate > sy-datum.
loop at screen.
if screen-name = 'YTESTHV-NAME'.
screen-input = '0'.
modify screen.
else.
screen-input = 1.
modify screen.
endif.
endloop.
endif.
Details screen PBO.
PROCESS BEFORE OUTPUT.
MODULE detail_init.
module change_mode.
module change_mode
if YTESTHV-yydate > sy-datum.
loop at screen.
if screen-name = 'YTESTHV-NAME'.
screen-input = 0.
modify screen.
endif.
endloop.
endif.
When YYDATE is greater than sy-datum field NAME is display only.
Regards,
Himanshu -
Listbox set to NOT editable cells; EditRow property seems to override
Hi All,
I have several listboxes that I programmatically set to Editable Cells or not, depending on the runtime status. When I have it turned OFF, I do not want the user to be able to edit the text values in the cells.
However, I have a RTM for the listbox with an "Edit" option. That menu item sets the EditRow property (after setting Key Focus) to the selected row. This makes the text editable, even if I have it turned OFF!!
This is not the behaviour I expected. Is this a bug?Could you provide the code that you are seeing this occur in? Its almost impossible to see if this is a bug without some example. The simpler the example the better.
It is possible that it is a bug, but it's also possible that you are setting the cell to edit mode after you set it to lock. I am wondering why you are doing that? Its most likely that you want to edit some cells but keep others locked from editing, and I do not think that is a bug, however, it might be a good product suggestion to keep certain cells permanently locked from the user, which is probably not the case with the lock function you are using (which most likely can be over ridden by other property nodes).
Regards,
Andrew
National Instruments
RIO Embedded Hardware PSE
CompactRIO Developers Guide -
How to set a cell editable at runtime for jtable
Hi evry body
i need to set a cell as editable during runtime and set some value for the cell and make it non editable after setting value
how can i do it? urgent help appreciated
regards
anilYou could override the methods isCellEditable(...) and setValueAt(...) in your JTable's TableModel to get the effect desired
// Assuming that each element of the array will be false initially
boolean[][] valueSet = new boolean[noRows][noCols];
public boolean isCellEditable(int row, int col) {
return !valueSet[row][col];
public void setValueAt(Object obj, int row, int col) {
super.setValueAt(obj, row, col);
valueSet[row][col] = true;
} -
How to set JTable cell editable/non-editable dynamically using NetBean?
I am using NetBean 6.5, create a database desktop application, I using the persistence entity manager to bind my JTable with database.
Now, I want to set practicular cells which are enable and disable, I tried to create my own table model and override the isEditable() method, which it seems didn't work. I guessed the problem is the persistence connection between my Table and database.
How can I solve it? Any example? I just googled the web and can't find example which use netbean combined with database. I know that a single JTable would work when creating your own model.
thx.I know what coding i did, Yes u r right but im new to GUI programming only,
That's why i posted it to forums, I gone through the Control Flow Statements link what u have given.
U didnt get my question at all.
Again the problem im facing is the table is already displayed with 2nd column uneditable.
When some Action done on table, i need to make 2nd column editable at run time.
Thanks if u provide me the solution instead of deciding what type of programmer im. -
How to set to NOT use any flash?
Two questions... sorry, they are dumb:
1- Does Safari 4.0.5 support flash?
2- If so, how can you turn it off totally so I can see what web sites might look like on iPad etc with no flash?
thanks,
tomTom,
No dumb questions...
Yes, Safari 4.0.5 supports Flash but just make sure you have the most recent Flash plugin version installed which is: Adobe Flash Player version 10.0.45.2 You can view installed plugins in Safari by clicking Help/Installed Plugins from the Safari Menu Bar.
You can install ClicktoFlash but you really don't need to install 3rd party software. If you visit a site that requires the Flash plugin on an iPad, all you will see is a blue square. You may not see the same results on a Mac running Safari with Flash disabled.
If you watch these videos you'll see what I mean.
Watch the iPad Keynote video here... http://www.apple.com/ipad/#video
and here. http://www.apple.com/quicktime/qtv/specialevent0110/
Carolyn
Message was edited by: Carolyn Samit -
How to set TextEdit not to open Documents automatically protected
I get texts for my redactional work that I have to cut&paste from Text Edit into my CMS. Unfortunately under Lion every document is opened in protected mode - causing ths annoying dialogue pop up whenever I "cut" for the first time.
How can I swith this off - it's really annoying and causing delay to my routine work !Go to Time Machine System Prefs and click on the Options button.
Set the file lock time as you'd like. -
How to set ResultSet not null?
Hello !
How can I set my ResultSet null? rs.next( ) is null.
Thanks in advance."...Hey, do you guys have an idea how to apply operator to method getTime() e.g rs.getTime("TimeOut") - rs.getTime("TimeIn")?..."
It can't be done.
One thing you should be checking is whether or not the last value returned from the result set was null, using the wasNull() method.
If you're getting a NPE, it could be that one of the values you think you're getting back from the database is really null.
Are you sure you want java.sql.Time? Not java.sql.Timestamp?
Code it like this:
java.sql.Timestamp timeIn = rs.getTimestamp("TimeIn");
java.sql.Timestamp.timeOut = rs.getTimestamp("TimeOut");
long duration = 0L;
if ((timeIn != null) && (timeOut != null))
long millisecondsIn = timeIn.getTime();
long millisecondsOut = timeOut.getTime();
duration = millisecondsOut - millisecondsIn;
assert (duration >= 0L);
}MOD -
How to set iTunes not to sync the apps I have on my iPad to my iPhone?
How can I do this. I always plug my phone in and iTunes transfer the purchased apps to mynlibrary, same with my iPad. Today I wanted to add some songs to both iPhone and iPad so I added them to iTunes library then I synced the iPad with no problem next I pluged in my iPhone and it started syncing apps, and at the top I saw A"installing 123kids" which is a kids app for my daughter on my iPad, I do not want this on my iPhone. Please help I'm confused.
No, I mean synchronize all the apps that I bought/dowloaded from the App store (in my laptop) on to my iphone. Like my Kindle app or ever note. Do I have to dowload them one by one from the App store on my phone or can they be synchronized/added through Icloud or some how?
-
NSFileImmutable (how to set schg not uchg)
I was playing around with NSFileManager and started setting test files immutable flags I realized that even if I was root it wasn't setting the schg flag that chflags gives you the option to set, so my question is, is it possible to set the schg flag with cocoa?
Hi Eric -
I think the ability to set the system immutable flag was added to NSURL in 10.6 (see [setResourceValue:forKey:error:|http://developer.apple.com/mac/library/document ation/Cocoa/Reference/Foundation/Classes/NSURLClass/Reference/Reference.html#//appleref/occ/instm/NSURL/setResourceValue:forKey:error:] and [NSURLIsSystemImmutableKey|http://developer.apple.com/mac/library/documentation /Cocoa/Reference/Foundation/Classes/NSURLClass/Reference/Reference.html#//apple_ref/doc/cref/NSURLIsSystemImmutableKey]). I don't know of any Cocoa method that does this in 10.5 or earlier.
Some info on unsetting that flag, btw:
[OSX FAQ|http://osxfaq.com/Tutorials/LearningCenter/AdvancedUnix/ugp2/page2.ws]
[How to start up in single-user or verbose mode|http://support.apple.com/kb/HT1492]
\- Ray -
How to set permissions to edit/save files copied from a Win 7 PC
I'm working on a project where I have to generate a series of screengrabs on a PC and transfer them to my MacPro via the network for onward tranmission via email but some need to be edited first in Photoshop.
If I'm just forwarding them via email with no changes there's no problem, but when I need to edit them in Photoshop I can't save unless I go to Get Info for the file concerned, unlock Sharing & Permissions (which requires my administrator password) and then change the 'everyone' drop-down setting from 'Read only' to 'Read & Write', then re-lock and close Get Info.
The default permissions for the PC files as they arrive over the network are:
nobody Read & Write
staff Read only
everyone Read only
I have dozens and possibly a hundred or more of these to do, so having to re-set Permissions every time is a major pain and waste of time.
Is there something I can change either on the Mac or the PC (which is running Windows 7) so that I can just edit and save these files without all this hassle?
Thanks,
Michaelhttp://www.lagentesoft.com/batchmod/ drag and drop permission modification software. Be careful with this. If you drag and drop a necessary system folder, you can render your Mac unbootable, except with an EXTERNAL optical drive.
-
How to set Sticky Notes open at all times in PDFs
XP Acrobat 9 Pro Extended
When I add a sticky note in a PDF, the sticky note always appears as an icon. Can I have sticky notes in a PDF open at all times, meaning when I open the PDF, the sticky notes in the PDF are already open? Can this be done. Thanks.In Acrobat's Preferences — play with the selections for "Commenting".
Be well... -
How to set itunes not to save genre files' artwork automatically
i just wonder if there is a way to prevent itunes to not to save genre artworks automatically from the pre-installed file?
thanxask the users in the iTunes forum: https://discussions.apple.com/community/itunes. good luck
Maybe you are looking for
-
Just bought Ipad mini tonight and it won't let me connect to my wifi connection during the set up stage.
-
Can you take a picture that you have taken from your iPod 5th gen and set that picture as your background?
-
Synchronizing Slave Repository
I have Server A with Repository Vendor running SP3 version. I have Server B running SP3 version. I created a Slave for the Vendor Repository on Server B . When I mount the repository on Server B and run Synchronization I get the error "Winsock error
-
[Bug] July 15th update ruined using the PS4 with XBR-55X850C...
So the new July 15th update for Sony's 2015 Android TVs came with Dualshock 4 integration on the Home Screen and the new Playstation Now app. The bad part is that now it conflicts with using the Dualshock 4 for ONLY Playstation 4, not Playstation Now
-
Files from mac to RDC and visa versa
I am trying to copy and paste folders from my macbook pro to my RDC and visa versa.Unfortuantly i am not having any luck does anyone have an idea how to do this i am a bit of a beginner on this stuff.cheers