W4R5 - 'AddProfile' Functionality
This commit is contained in:
1 parent
5e8ec8ebdf
commit
591240fe4f
2 files changed
+14
-1
No files matched your search
@@ -14,4 +14,8 @@ import java.io.FileReader;
|
|||||||
*/
|
*/
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
|
|
||||||
|
public static void addUser(String profile, String title, String name, String email) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,16 @@ public class UserProfile {
|
|||||||
if (choice == JOptionPane.OK_OPTION)
|
if (choice == JOptionPane.OK_OPTION)
|
||||||
{
|
{
|
||||||
System.out.println("OK option pressed.");
|
System.out.println("OK option pressed.");
|
||||||
} else if (choice == JOptionPane.CANCEL_OPTION) {
|
|
||||||
|
String profile = JT11.getText();
|
||||||
|
String title = JT21.getText();
|
||||||
|
String name = JT31.getText();
|
||||||
|
String email = JT41.getText();
|
||||||
|
|
||||||
|
User.addUser(profile, title, name, email);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (choice == JOptionPane.CANCEL_OPTION) {
|
||||||
System.out.println("Cancel option pressed.");
|
System.out.println("Cancel option pressed.");
|
||||||
dialog.dispose();
|
dialog.dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user