Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6782319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:43:38+00:00 2026-05-26T16:43:38+00:00

I have created a Swing Application- GUI containing fields like TextFields, Labels, CheckBoxes and

  • 0

I have created a Swing Application- GUI containing fields like TextFields, Labels, CheckBoxes and ComboBoxes. When the user enters some information, I want the details of the textfields, comboboxes and checkboxes to be saved into a file, and the next time when a user opens this Window, I want the details that have been saved in the file, i.e. those that have been entered by the user the previous time to be loaded into the GUI. Can anyone please help me in doing this? I hope you understand the question, if not I will explain in a more detailed manner.

Thank you so much in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:43:39+00:00Added an answer on May 26, 2026 at 4:43 pm

    Here is a simple example using the java.util.prefs package:

    // Retrieve the user preference node for the package com.mycompany
    Preferences prefs = Preferences.userNodeForPackage(com.mycompany.MyClass.class);
    
    // Preference key name
    final String PREF_NAME = "name_of_preference";
    
    // Set the value of the preference
    String newValue = "a string";
    prefs.put(PREF_NAME, newValue);
    
    // Get the value of the preference;
    // default value is returned if the preference does not exist
    String defaultValue = "default string";
    String propertyValue = prefs.get(PREF_NAME, defaultValue); // "a string"
    

    The way preferences are saved is OS-dependent. On Windows, it will use the registry.

    Examples of use: http://www.exampledepot.com/egs/java.util.prefs/pkg.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create extend a Java Swing application to have a look
I am using swing to create my GUI. J have a JFrame containing one
I have created one java-swing application. The application runs perfectly runs perfect on my
I have created in my Java Swing application a main window with a JButton.
Hi I have created a swing application using java 1.5 and i created a
Hi I have created a sample java swing application Mac os. Now I want
I have always been a .NET developer. I have created some Swing apps in
I have created a Java Swing application using JDK 1.6. Many customers are asking
I created a form using Swing in Java. In the form I have used
I'm new to java so forgive the noob question. I have created a swing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.