Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Connection Class

 
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Respect Sir,

While using Netbeans 12 for Java, I have may forms.
I have to use following codes in every form



What I want to create a class for connection and call that class in every Jframe forms

So I used this method

https://imgur.com/a/WjaS4Hk

I created a class named get_connection.java

this class has following codes




Above codes work fine, db is connected.

But how to call this class in other Jframe forms?

Regards
 
Master Rancher
Posts: 4107
37
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also posted here: https://www.dreamincode.net/forums/topic/420563-one-connection-class-for-all-jframe-forms/page__gopid__2428166&#entry2428166

Please read:  https://coderanch.com/wiki/660346/Wiki/Forthright-Cross-Posting-Sites

Also you should tell the other forum that the other problem you posted there (and here) has been solved.
https://coderanch.com/t/737683/databases/java-lang-ClassNotFoundException-microsoft-sqlserver
 
Tariqq Mehmoodd
Greenhorn
Posts: 23
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK Sir I shall care next time.

Regards
 
Norm Radder
Master Rancher
Posts: 4107
37
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I shall care next time.


It is not too late to do it now.

There are people trying to help on the other forum that should know that this question is posted here also.
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic