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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:56:27+00:00 2026-05-26T22:56:27+00:00

it’s my first post in here, but you have been helping me indirectly in

  • 0

it’s my first post in here, but you have been helping me indirectly in many ways. But this kind of thing, like the title says, I still can’t figure out.
I think I don’t need to say I’m a noob in such a thing, and any kind of help would be great =] .. By the way, I’m using netbeans (Java).

So, here’s my problem:

  • I have a jFrame1 with 3 textFields.
  • Also, in this jFrame1, I have a button that should do the following:
    +Look through the whole 3 textFields and only select the words that are between “” and/or between **. Other words should not be used. Also, this button should redirect me to jFrame2.
  • In the other jFrame2, the ‘special’ words found in the 3 textFields (jFram1), should be put in there, inside a jTextArea1.

And that’s where I’m lost. Because I can’t find a way to get these ‘special’ words and throw them in there.

Let me post the code in here, so you guys can take a closer look to what I’m doing right/wrong:

//Below, the Jframe1

public class JFrame1 extends javax.swing.JFrame {

        public TxtFieldsQuotationMarks tfqm = new TxtFieldsQuotationMarks();
        public TxtFieldsAsterisk tfa = new TxtFieldsAsterisk();

public JFrame1() 
            {                
            initComponents();           
            }

//Below, the classes I created to support the textFields in JFrame1

public class TxtFieldsQuotationMarks 
  {
    public String field1;
    public String field2;
    public String field3;
  }

public class TxtFieldsAsterisk 
  {
    public String field1;
    public String field2;
    public String field3;
  }

//Bellow, the function that should do the trick (of finding those ‘special words’)

private String Get_Fields_FindWords()(String Value)
{
    if  (Value.isEmpty())
    {
       return "";
    }
    else
    {
      String AuxStr = Value.substring(Value.indexOf('"'),Value.length());
      return AuxStr.substring(1, AuxStr.indexOf('"'));
    }
}


private String Get_Fields_Asterisk_FindWords(String Value)
{
    if  (Value.isEmpty())    

    {
       return "";
    }
    else
    {
      String AuxStr = Value.substring(Value.indexOf('*'),Value.length());
      return AuxStr.substring(1, AuxStr.indexOf('*'));
    }
}

//Below, the button in JFrame1, that should find the words and open the JFrame2 for me with those words (Quotation Marks on top and Asterisks below it)

private void btnJFrame1ActionPerformed(java.awt.event.ActionEvent evt) 
   {

    Get_Fields_FindWords();
    Get_Fields_Asterisks_FindWords();
    JFrame2 jf2 = new JFrame2();
        jf2.setVisible(true);
   }

//Below, the methods I tried to implement, in order to save the ‘special words’ in the textFields (this is also in the JFrame1)

public void Get_Fields()
    {
        fields.field1 = Return_StringQuotationMarks(txtField1.getText());
        fields.field2 = Retorna_StringAspas(txtField2.getText());
        fields.field3 = Retorna_StringAspas(txtField3.getText());
    }

public void Get_Fields_Asterisk()
    {
        fields_asterisk.field1 = Return_StringAsterisk(txtField1.getText());
        fields_asterisk.field2 = Return_StringAsterisk(txtField2.getText());
        fields_asterisk.field3 = Return_StringAsterisk(txtField3.getText());
    }

//Finally, here’s the second JFrame (Jframe2), with the textArea (textArea)

public class JFrame2 extends javax.swing.JFrame {

        TxtFieldsQuotationMarks tfqm = new TxtFieldsQuotationMarks();
        TxtFieldsAsterisk tfa = new TxtFieldsAsterisk();


        public JFrame2() 
        {
            initComponents();
        }
}

That’s pretty much it, guys. I hope you can understand what I’m trying to do and can help me somehow. I really need this thing done as soon as possible.

  • 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-26T22:56:27+00:00Added an answer on May 26, 2026 at 10:56 pm

    Well I think you can pass the words founds by constructor of JFrame2. For example:

    private void btnJFrame1ActionPerformed(java.awt.event.ActionEvent evt) 
    {
        JFrame2 jf2 = new JFrame2(
                                  Get_Fields(txtField1.getText()),
                                  Get_Fields(txtField2.getText()),
                                  Get_Fields(txtField3.getText()),
                                  Get_Fields_Asterisk(txtField1.getText()),
                                  Get_Fields_Asterisk(txtField1.getText()),
                                  Get_Fields_Asterisk(txtField1.getText()));
        jf2.setVisible(true);
    }
    

    And the constructor of JFrame2:

    public JFrame2(String field1, String field2, String field3, String asterisk1, String asterisk2, String asterisk3) 
    {
        initComponents(field1, field2, field3, asterisk1, asterisk2, asterisk3);
    }
    

    Then you can initializate components in JFrame2 with the values searched in JFrame1.
    You don’t need to save it somewhere you only need it in initialization.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
This could be a duplicate question, but I have no idea what search terms
I have a jquery bug and I've been looking for hours now, I can't
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.