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 6379277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:07:01+00:00 2026-05-25T02:07:01+00:00

hi i have two frames created in the same way: public class DateFilter extends

  • 0

hi i have two frames created in the same way:

public class DateFilter extends JFrame {

private final JDateChooser dateChooser = new JDateChooser();
private final JDateChooser dateChooser_1 = new JDateChooser();
private final JComboBox comboBox = new JComboBox();
private final JButton filtruotiButton = new JButton();

public DateFilter() {
    super();
    setBounds(100, 100, 277, 167);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    try {
        jbInit();
    } catch (Throwable e) {
        e.printStackTrace();
    }

}
private void jbInit() throws Exception {
    getContentPane().setLayout(null);
    setTitle("Priemimo datos filtras");
    setResizable(false);

    getContentPane().add(dateChooser);
    dateChooser.setBounds(70, 40, 117, 20);

    getContentPane().add(dateChooser_1);
    dateChooser_1.setBounds(70, 65, 117, 20);
    dateChooser_1.setEnabled(false);
...

tell me plz someone how to get data from one to another frame
for example if i want to place date from this frame’s dateChooser to another frame’s textField using button

  • 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-25T02:07:02+00:00Added an answer on May 25, 2026 at 2:07 am

    You will need to pass the instance of the first frame to the second and than call a method on this instance.

    Little sample code:

    public class FrameA extends JFrame {
    
      public void setSomeDate() {
      }
    }
    
    public class FrameB extends JFrame {
    
      public void doSomething() {
        FrameA frameA = new FrameA();
        frameA.setSomeDate();
      }
    }
    

    Since I guessed that you are a beginner, I answered with this pretty simple and basic example. A more sophisticated way would be using the MVC pattern, of course!

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

Sidebar

Related Questions

We have some web pages which have two frames, with one frame in the
I am using R and I have two data frames: carrots and cucumbers. Each
I have two Java class hierarchies that share a common ancestor and implement a
I've created two wave files using Audacity. Both have 44100hz sample rate, 32-bit float
How does images.google.com render its frames?? I have two servers, that have external web
I have a swf with four frames. The first frame loads an external class
I have a MATLAB script running two copies of the same function and I
While data frame columns must have the same number rows, is there any way
I have two data frames like so: A B 1 6 2 7 5
I have two data frames. One contains a large amount of data. The second

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.