Vlad Stan

Greenhorn
+ Follow
since Apr 17, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vlad Stan

Hello, how exactly can you add selected row to database and how can you check if the ID is not in the database(ID is unique)?
Atm i'm taking everything from jtable to database.


This is the code for selected row :
6 years ago

Carey Brown wrote:
I don't see anything obviously wrong with your code. I'd need to know more about your table model. You seem to have more columns in your model than you want to write. Can you just write out the specific columns that you're interested in? You may have an issue with your newlines: \n vs \r\n, depending on which program you use to view the file.




Well
this writes in first column the first name and lastname that user enters(on button click)


When he pushes test is done, it counts up correct answers and put them in second row.

Hope this helps .... cause i got around 1000+lines ^.^
7 years ago

Carey Brown wrote:Call setReadOnly() after you write and close the file.


Awsome did work now!

but how is it possible to get output:


my current output , but i want to get it -



7 years ago

Knute Snortum wrote:Can you post the code that is trying to set the file to read only?




7 years ago

Stephan van Hulst wrote:What operating system are you working with?


Win7 x64 Eclipse gui builder.
only thing that missing in my whole procjet... have been struggling few days already
7 years ago

Stephan van Hulst wrote:Hi Vlad, welcome to CodeRanch!

You should probably take a look at Files.setAttribute() to set an operating system specific attribute (such as "acl:acl", "posix:permissions" or "dos:readonly").

If that fails, take a look at File.setReadOnly().



well no idea , but i couldnt make it work,checked so much guides but....
readOnly was fine but when you open it still can write on it...
7 years ago
How can i make that file is read only and for example make it appear in desktop.
Cause i tried with readOnly(), and that didnt work for me.

Could you help me with my code please?




7 years ago