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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:20:13+00:00 2026-06-11T21:20:13+00:00

So this is not an error but rather a thought, I have a java

  • 0

So this is not an error but rather a thought, I have a java class, Jform1, which is a JForm. I am trying to take only double values in to the 3 textfields and then do some computation with these numbers. But if the user fails to enter the double values and enters any characters I want to throw an exception, not just display that the it is a char and not valid either in a label or a dialogbox.
So I want to create a *entered_Valuenotvalid* exception class how do I do that? I can’t even think of how to do that, mainly because this is a seprate class itself and then the Jform is a seprate class so if error happens here then i have to get the exception from the *entered_Valuenotvalid* class.

the only thing I can think of is extending the *entered_Valuenotvalid* class, or is there a better way to do that.

  • 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-06-11T21:20:14+00:00Added an answer on June 11, 2026 at 9:20 pm

    An exception is just a subclass of Throwable. Create the class you want, choose which JDK exception to subclass (probably IllegalArgumentException), create an instance, and throw it.

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

Sidebar

Related Questions

I have viewed most of the other threads regarding this error but have not
This code does not throw an error but the query fails, that is, the
This works printf(%s body\n,__PRETTY_FUNCTION__); But this does not (Error Expected ')' ): printf(__PRETTY_FUNCTION__ body\n);
Why it's a syntax error: my @hash{1..4}=(1..4); but not this one: my %hash; @hash{1..4}=(1..4);
I'm getting this error on Heroku but not locally (using PostgreSQL on both).. error
Why I get error with this query on my live server but not on
My question is not about how to solve this error(I already solved it) but
Why do I get error in this code?Even if i do not link but
I'm not sure why this isn't working. I don't have any errors, but what
Not sure whether this is the right place, but I have a question related

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.