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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:12:37+00:00 2026-05-26T17:12:37+00:00

My application will be similar to MS Compiled HTML Help Viewer. On the left

  • 0

My application will be similar to MS Compiled HTML Help Viewer. On the left side, I will be using JList and on the right side, a JTextPane containing long text files.

I have done upto this, but now, quite confused which component to use for displaying the a Dialog box which will be for searching the words in the displayed text files. I tried JDialog
but with DISPOSE_ON_EXIT.

I select any word to find its next occurence, I just pass it to the JDialog as a global parameter and do the process. After this I close the JDialog. And when the same process is done for another word, the JDialog just doesnt take the new second word, it works with the first word only… What I am doing wrong… ??? Any solution..??? Thanks in advance

EDIT –

This is the code for JDialog with defaultCloseOperation as DISPOSE (NetBeans)-

public class Search extends JDialog
{
   public Search(JFrame parent, boolean modal, String sWords)
   {
       super(parent, modal);
       initComponents();
       setTitle("Search for - " + sWords);
       //Searching procedure

Now when the user copies some text and invokes this form I pass this selected word to the Search JDialog as –

   Search s = new Search(parent, true, selectedWord);
  • 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-26T17:12:37+00:00Added an answer on May 26, 2026 at 5:12 pm

    I recommend you to use JOptionPane:

    JOptionPane pane = new JOptionPane();
    JPanel panel = new JPanel();
    JLabel label = new JLabel("Hello World!");
    panel.add(label); // You can add any components you want to this panel
    
     pane.showOptionDialog(null, panel, "JOptionPane Title", 
         JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, 
         null, new Object[]{}, null);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will make an application with a lot of similar items (millions), and I
I am creating a windows application using VB.Net and this application will take a
I am currently writing an application that will serve a similar purpose for multiple
My application will have a per machine (not per user) Startup shortcut. I can
My ASP.NET MVC application will take a lot of bandwidth and storage space. How
Every page on my application will display 1000 records and they are only needed
I need to simulate how my application will look when a user is driving
Basically multiple instances of our application will be launched but they need to have
I am developing a Client-Server based application in which client application will access server
I'm working on an application for a charitable student organization. The application will track

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.