elad cohen

Greenhorn
+ Follow
since Jun 14, 2020
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 elad cohen

Hello,

I'm building JAVA Swing APP.
the app include some picture; for now the picture load from a specific path in my PC.
I wondering if there is any wat to upload the files into the project and load it from there.
the main purpose is to share this project with other people.

thanks
OK. I'll change it.
in this case, how can I achieve my goal, how can I open the product list view as editable for a specific user ?
any JtextFiles I configured as non-editable so customer could not change it.
thanks for your comment.
I have 2 scenarios that i need to achive.
Customer login(with username and pass) to the system with login page and forward to the product list without the option to change prices - working for this moment.
superUser login (with a SPECIFIC username and pass) and forward to the product list but now with the option to edit the prices., meaning change the JTextFiled which present the price.
Hello all,

I'm writing my first APP with JAVA Swing.
My app including some product list which customers can add to his cart.
my goal is - when superuser sign in gives him permission to edit price.
the price writes into JTextFiled which root user needs to change.
I wondering how can i give specif permission for ant kind of user - customer/superuser.
I think that (not sure)  give specific thread name when superuser call and a different one for customer, verify the name on the list class will do that.
please help me understand how can I do that.
please feel free to advise a differnt way to do that.

many thanks

Thanks for your response, I will take care in the next time.
on line 24 I'll use the user I create.
3 weeks ago
Hello gents,

I am building an application with JAVA swing.
I have a create user page, in this page, the user insert information about the account.
I created some cases that handle wrong input like empty strings such empty name field, empty ID field, etc... this handle pop up showMessageDialog.
I wondering how can I create a flow that after the user close the showMessageDialog, the registration page appear again with all the details.

This my create user function -

public boolean createNewUser() throws Exception {
SignUpView signUpview = new SignUpView();
String nameString = signUpview.getnameField();
String idString = signUpview.getIDtextField();
String emailString = signUpview.getEmailText2();
String passwordString = signUpview.getPsswordTextField();
String passwordAgainString = signUpview.getPasswordAgainTextField();
boolean addUserResult = false;

if (nameString.isEmpty()){signUpview.PrintErrorMessage("Please Enter name");}

if (idString.isEmpty()) {signUpview.PrintErrorMessage("Please Enter ID");}

if (emailString.isEmpty()) {signUpview.PrintErrorMessage("Please Enter Email");}

if (passwordString.isEmpty()) {signUpview.PrintErrorMessage("Please Enter Password");}

if (passwordAgainString.isEmpty()) {signUpview.PrintErrorMessage("Please Re-Insert your Password");}

if(!(passwordString.equals(passwordAgainString))){signUpview.PrintErrorMessage("Passwords Do not match!");}

MarkoliaUser userTocreate = new MarkoliaUser(nameString, idString, emailString, passwordString);

//addUserResult = userRep.addNewUser();


return true;

}

}

this is my showMessageDialog function -

public void PrintErrorMessage(String error) {
JOptionPane.showMessageDialog(null, error);
}

please advise,

thanks !
3 weeks ago
thanks for the help guys,
I tried you solution but its give me the same output.
I copy and paste my contractor, after that , the problem disappear, maybe it is a know bug...

thanks
3 weeks ago
Hello,

I face for some issue that I could not find the root cause.
this the error ->

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Unhandled exception type IOException
Unhandled exception type ClassNotFoundException
Unhandled exception type IOException
Unhandled exception type ClassNotFoundException

at Controller.Controller.<init>(Controller.java:21)
at Drive.MVCdriver.main(MVCdriver.java:44)

this is my code -

Controller -




MVCdriver (run the main) -


UserRepositoryImple ->


please help me understand what could be wrong
note: I'm using Eclipse.
3 weeks ago