Class1 cant find info in class2 ?
I got 2 classes.
My prob. is that i need some info from class1, to class2.
I got this, in my class1:
public void openConnection() {
if (name == null)
name = JOptionPane.showInputDialog("Enter name of Database you want to connect");
String query = "SELECT * FROM movie ORDER BY id;";
String url = "jdbc:postgresql://192.168.10.82:5432/" + name + "&charSet=LATIN1";
String driver = "org.postgresql.Driver";
String user = "username";
String pass = "password";
try {
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, user, pass);
state = conn.createStatement();
model.setResultSet(state.executeQuery(query));
catch (Exception ex) {
System.err.println(ex);
(The "model" is a 3. class)
Now i need class2 to know what "model" contains of info, to fill out a JTable.
How do i do this??? how do i 'import' model??
This is my class1:
import java.sql.*;
import javax.swing.*;
public class openConnection {
ResultsModel model = new ResultsModel();
Statement state;
String name = null;
public void openConnection() {
if (name == null)
name = JOptionPane.showInputDialog("Enter name of Database you want to connect");
String query = "SELECT * FROM movie ORDER BY id;";
String url = "jdbc:postgresql://192.168.10.82:5432/" + name + "&charSet=LATIN1";
String driver = "org.postgresql.Driver";
String user = "plt";
String pass = "rector";
try {
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, user, pass);
state = conn.createStatement();
model.setResultSet(state.executeQuery(query));
catch (Exception ex) {
System.err.println(ex);
Similar Messages
-
Really weird ipod problem that i cant find info on
Okay, so i took my ipod to my dad's house over the weekend and his computer messed it up. Now when i import songs, they appear to convert to the ipod when I'm in itunes, but once i unplug the ipod from the computer (and yes i do eject it first) the songs disappear. For some reason i can't ad any songs to my ipod anymore. Earlier some weird message about a corrupted file chklis/file7 or something along that line at least came up. And well, I have no idea what to do. Ive been searching for help all night and i havent found any yet.
Assuming that your computer recognizes the iPod is connected, check out the instructions/suggestions here.
Music from iPod to computer.
There's also another method I've seen posted. I've successfully tested this across several different Windows PCs.
Open iTunes and select edit/preferences/advanced/general. Put a check mark in the box marked "copy files to iTunes music folder when adding to library" and also "keep iTunes music folder organized", then click 'ok'.
Connect the iPod whilst holding down the shift/ctrl keys to prevent any auto sync, and if you see the dialogue window asking if you want to sync to this itunes library, click 'no'.
Then go to file/add folder, open 'my computer', select your iPod and click 'ok'.
The music files should transfer to your iTunes.
However it appears that no playlists or any other info such as ratings/last played etc will transfer.
If this is important to you, you may want to use other options.
There's Yamipod. This is a free program that transfers music and playlists etc from iPod back to the computer. -
Laser M127- M128. Cant find info on how to scan from my Hp laser to my computer
Hello,
I'm try to scan a document from my M-127 M-128 Hp Laser jet to my computer and have No idea were to begin
Please help. Thank YouHello @djjerryc , and welcome to the HP Forums, I hope you enjoy your experience!
I can see you're looking into scan options!
I would love to try and help you, but I do need a little information first. I am linking a few HP Support documents below that will show you how to find which operating system you are using. Also, if you're using Windows, please include whether your operating system is 32-bit or 64-bit. With this information I can provide you with accurate information.
Mac OS X: How Do I Find Which Mac OS X Version Is on My Computer?
Which Windows operating system am I running?
Is the Windows Version on My Computer 32-bit or 64-bit?
Also, are you connected via a wireless connection or USB?
Do you have any issues when making a copy?
Please let me know what you find. Thanks for posting on the HP Forums!
Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
Jamieson
I work on behalf of HP
"Remember, I'm pulling for you, we're all in this together!" - Red Green. -
Cant find info about dirt behind sreen, 4 mo old
my 3gs is only 4 mo old and it has dirt behind the screen! realy bug'n me now, iv had at&t for several years now and the first thing they tell me is they dont work on them. anyone know what apple will do about it? iv searched it but iv not dropped it in the dirt, trash,or water. its been dropped twice both times it was in a case
I had this happen to my 3G about a year ago. Just some specs of dust behind the screen. I took it into an Apple store and they replaced it with no questions asked, for free (because it was still under the applecare warranty).
-
My iphone got locked and it says i need to plug it into itunes. But i cant find any info on itunes on how to unlock it, what do i do?
See here: http://support.apple.com/kb/HT1212
Don't let them touch your phone again. -
I cant find ( Send reset security info email )
hello
i forget answer of security question for my apple id then i find in apple support this link ( http://support.apple.com/kb/HT6170 )
but in step 5 i cant find ( Send reset security info email ) link and in this site call if i cant find this link contact to apple support
please help to rest my security question
best regardYou need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
The people on these boards are neither Apple Support nor the Account Security Team. None of them can reset your questions for you.
(114465) -
In CS6 CodeView i could see the codepage info in the Statusbar at bottom right of the current Document ( UTF-8 etc ) - Cant find it in CC2014.
Is this a setting issue? Now i need to hit Cmd-J and some clicks to find the Info instead of just looking at the bottom right corner.
Can someone help me?
Best wishes, Jens
added imageHello Nancy.
Yes, there's all fine. That's the long way. The information in the status line was probably forgotten or rationalized away? That's not nice, because we need it here in almost every file (german texts). It just saves a lot of time to look in the corner instead of a menu to open. Whether it comes back well?
Before I forget. Please excuse the jostling an thank you for your reply. -
ive updated itunes and it findsmy iphone and then an error message says that itunes cant find anything on it and tells me to restore it...dont understand as it was all working fine before i updated itunes earlier .....help?
Restore with iTunes as provided with the error message.
-
I have a 3G and thought it was backed up on my phone cant find i also backed up to cloud how do I get the info
Welcome to the Apple community.
Unfortunately, I don't fully understand your question, but gather it is something to do with a backup in iCloud. The part that I don't understand is the iPhone 3G is not capable of running iCloud. Am I missing something here. -
Cant find the movie in my ipod classic 80gb.
First i could not import the movie to itunes, but i changed the name to something shorter and then it came in to Itunes. And now i cant find it in my ipod. the movie is .Mp4 och it a H.264 codec (i dont know what that h.264 means...). But i have a other movie thats .mp4 and h.264 too, and that movie is in my ipod. why??
A spelling or punctuation mistake, or sometimes a trailing space usually causes this after the artists and/or song name, which fools the iPod into thinking that there are two different artists or songs. The trailing space is the hardest to spot.
Best way to cure this is to go into iTunes, highlight that artist and/or songs, right click on them and select "get info".
This brings up the multiple song info window. In the artist or song box retype the name, as you would like it, and then click ok. Do this even if no mistakes are immediately visible.
Re sync this new artist/song info to your iPod. -
Mid 2010 macbook pro wont boot, cant find hhd
I got a 13' Macbook pro, after a kernal panic, the computer stuck at the same page: u need to restart your computer. Later i run restore disk, but is seems cant find my hhd. Most likely i need to chaneg a new HHD?? I tried to search on apple website how much is the HHD but cant find any info. Is there one had same problem and got their HHD changed? Should I fix it thru apple or should i get the HHD myself and find someone to put it in for me? I am out of warranty. Really need help ~~ Thanks
Later i run restore disk,
Disconnect all peripherals from your computer.
Boot up from the install disc #1.
Run Repair Disk from the utility menu. To use the Install Mac OS X disc, insert the disc, and restart your computer while holding down the C key as it starts up.
Select your language.
Once on the desktop, select Utility in the menu bar.
Select Disk Utility.
Select the disk or volume in the list of disks and volumes, and then click First Aid.
Click Repair Disk.
Restart your computer when done.
Repair permissions after you reach the desktop-http://docs.info.apple.com/article.html?artnum=25751 and restart your computer.
If you still cannot find your hard drive, Diskwarrior has been known to do so. -
My ipod 5th gen says it is connected to the internet and i can go on apps that require an internet connection but whe i try to use the weather or another app that uses your current location it cant find me???
If you open the Maps app where does that say you are located?
For location the iPod uses the location of nearby routers that are in Apple's database of routers and their location. Thus it appears that Apple's database is incorrect. You do not have to be connected to the router, just within range.
Apple periodically updates their database based on information they obtain from iPhones, The iPhone has to have turned on the option to send info to Apple. no one has found another way to get the location of a router added/corrected.
You can confirm that by going to well-know place with wifi like Starbucks or McDonalds -
hi, i have tryed to install os x leopard, (its a old imac) , disk utility is greyed out , my install dvd cant find any hdd to install on , my only way to format and configure is through terminal but dont know what commands to execute...
i tryed diffrent commands such as diskutil eraseDisk JHFS+ Disk1
diskutil list , wont show up my harddrive , i now its functionally cause it shows up in disk utility with name and i can get info about it , but everything is greyed out can only switch between "erase , partition , recover , Raid ,....
when i click the apple in the top left corner the whole menu is greyed out... what to do ? help me please
Sincerly AppleNoob92
p.s i have no experience in apple imac's at all never used before, but im kinda windows nerd so computers i understand but this imac make my insane, cant seem to find any solutions anywhere on the WWW....Your HD may be crashed, so you probably should use the oringinal install discs to run Apple Hardware Test in extended mode. If error codes appear this confirms a hardware failure. In addition you cannnot repair the HD using Disk Utility from the startup disk, you have to use the origninal Install discs that shipped with the computer or the most up-to-date version of OS X on a disc that you have.
-
I cant find my serial number help pls
I cant find my serial number anywhere in my house I have been looking for almost a month. I had my desktop whipped clean because it was freezing on me and I had no other choice but to lose photos and info that was saved on my desktop but now I cant find the serial number for my adobe photoshop elements 12 and adobe premiere elements 12 , someone please help me figure something out .
http://www.apple.com/retail/
Enter your zip code, pick your store, and make an appointment. -
I have logic pro, soundtrack pro will not open i get an error message what do i do? i cant find the receipts ive checked my library am i looking in the wrong place?
I get the same kind of thing..
I'm on osx 10.7.2 and once I click the soundtrack pro icon I get an error message. I had problems with logic pro & my digi002r soundcard midi drivers but now is fixed (using a midi adapter).
here is the code:
Process: Soundtrack Pro [1705]
Path: /Applications/Soundtrack Pro.app/Contents/MacOS/Soundtrack Pro
Identifier: com.apple.soundtrackpro
Version: 3.0.1 (960)
Build Info: SoundtrackProProject-9600000~277
Code Type: X86 (Native)
Parent Process: launchd [140]
Date/Time: 2011-10-18 13:12:05.201 +0200
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
Interval Since Last Report: 195725 sec
Crashes Since Last Report: 3
Per-App Crashes Since Last Report: 2
Anonymous UUID: 23728D81-590B-4C3A-8C67-1709945CD132
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: /Library/Application Support/ProApps/*/ProFX.framework/Versions/A/ProFX
Referenced from: /Applications/Soundtrack Pro.app/Contents/MacOS/Soundtrack Pro
Reason: image not found
Binary Images:
0x1000 - 0x7f7ff8 com.apple.soundtrackpro (3.0.1 - 960) <77CF322B-8BBE-AAEA-173F-75A237035319> /Applications/Soundtrack Pro.app/Contents/MacOS/Soundtrack Pro
0x947000 - 0x94bfe6 +STPInterleave (??? - ???) <E87D1F34-6D97-63DB-454C-CF3D1B03F8E5> /Applications/Soundtrack Pro.app/Contents/Frameworks/STPInterleave.framework/Versions/A/STPInterleave
0x952000 - 0x98ffff com.apple.vmutils (4.2.1 - 107) <43B3BFA5-8362-3EBD-B44B-32DCE9885082> /System/Library/PrivateFrameworks/vmutils.framework/Versions/A/vmutils
0x9a9000 - 0x9f5ffb com.apple.audio.midi.CoreMIDI (1.8 - 42) <CBD34EBC-0FFD-34B4-B55A-BE1F61EF4BD8> /System/Library/Frameworks/CoreMIDI.framework/Versions/A/CoreMIDI
0xa18000 - 0xc3eff7 com.apple.prokit (7.1.1 - 1511) <498819A4-1BDD-3671-8796-E11865BCFBCE> /System/Library/PrivateFrameworks/ProKit.framework/Versions/A/ProKit
0xd49000 - 0xd49fff com.apple.iokit.dvcomponentglue (2.0.7 - 2.0.7) <1CFA5944-AB33-3A41-B4D2-4A624A514C0D> /System/Library/Frameworks/DVComponentGlue.framework/Versions/A/DVComponentGlue
0xd4d000 - 0xd54fff com.apple.AEProfiling (1.2 - 22) <43A46C32-8E13-82DD-8AF1-2A40690BF810> /Applications/Soundtrack Pro.app/Contents/Frameworks/AEProfiling.framework/Versions/A/AEProfiling
0xd5e000 - 0xd6dfff com.apple.AERegistration (1.2 - 77) <5D18C47F-6F9E-0C4C-8875-24A14A97186D> /Applications/Soundtrack Pro.app/Contents/Frameworks/AERegistration.framework/Versions/A/AERegistration
0xd81000 - 0xd83fff com.apple.ExceptionHandling (1.5 - 10) <6CA9446C-7EF9-35EE-BDF2-AA8D51E93E9E> /System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHand ling
0xd89000 - 0xe49fff com.apple.omf_framework (1.1.0 - 1.0) <ED5F21BC-18CD-D7F7-3D2E-F7F856BC0D40> /Applications/Soundtrack Pro.app/Contents/Frameworks/OMF.framework/Versions/A/OMF
0x11000000 - 0x1102afeb com.apple.proapps.ControlSurfaceSupport (2.0 - 68) <BD914236-49D8-9C9A-E8D6-CBC1738850B3> /Applications/Soundtrack Pro.app/Contents/Frameworks/ControlSurfaceSupport.framework/Versions/A/ControlS urfaceSupport
0x8fe88000 - 0x8feba9c7 dyld (195.5 - ???) <134323A7-49DC-3A9D-ACFD-32FAD0FD6BA2> /usr/lib/dyld
0x90840000 - 0x90992fff com.apple.audio.toolbox.AudioToolbox (1.7.1 - 1.7.1) <7646E131-08EE-3D72-ADA2-4A61C562B36E> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x90993000 - 0x90993ff2 com.apple.CoreServices (53 - 53) <7CB7AA95-D5A7-366A-BB8A-035AA9E582F8> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x91e60000 - 0x92036fe3 com.apple.CoreFoundation (6.7.1 - 635.15) <AC9F6462-6315-3D89-8075-D048DB4DBF7E> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x924a8000 - 0x92509ffb com.apple.audio.CoreAudio (4.0.1 - 4.0.1) <089D78E0-46A6-38DB-9545-7F35CC815939> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x93281000 - 0x9328ffff com.apple.opengl (1.7.5 - 1.7.5) <81166D23-DE8E-3938-AAD3-29B1FA5E446E> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x93331000 - 0x93331fff com.apple.vecLib (3.7 - vecLib 3.7) <8CCF99BF-A4B7-3C01-9219-B83D2AE5F82A> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x93332000 - 0x93493ffb com.apple.QuartzCore (1.7 - 270.0) <0916DA83-6400-3FEA-BC53-5F4BA4D126EC> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x94326000 - 0x9436dfff com.apple.SystemConfiguration (1.11.1 - 1.11) <CA6CE2B6-DC18-31FF-9668-70BB2FD8D7BB> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
0x94420000 - 0x946a5fe3 com.apple.QuickTime (7.7.1 - 2306) <F8C64DC4-3FE4-3A06-B10B-59E7F3BA6FDD> /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x97dd0000 - 0x98082ff7 com.apple.security (7.0 - 55010) <BE0350C5-5221-3BFF-B674-646AB1BA0F2E> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x99d12000 - 0x99d76fff com.apple.framework.IOKit (2.0 - ???) <D14460ED-2B6C-375D-B3A4-B8C82E922666> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x9adc8000 - 0x9adc8fff com.apple.audio.units.AudioUnit (1.7.1 - 1.7.1) <2E71E880-25D1-3210-8D26-21EC47ED810C> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x9aef1000 - 0x9aef1fff com.apple.Carbon (153 - 153) <6FF98F0F-2CDE-3888-A304-4ED447D24CE3> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x9b2ec000 - 0x9b2ecfff com.apple.Cocoa (6.6 - ???) <650273EF-1ABC-334E-B745-B75AF028F9F4> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
Model: iMac12,1, BootROM IM121.0047.B0A, 4 processors, Intel Core i5, 2.5 GHz, 4 GB, SMC 1.71f21
Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 512 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x02FE, 0x45424A3231554538424655302D444A2D4620
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x02FE, 0x45424A3231554538424655302D444A2D4620
AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.58.4-P2P
Bluetooth: Version 4.0.1f4, 2 service, 18 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
Serial ATA Device: WDC WD5000AAKS-402AA0, 500,11 GB
Serial ATA Device: HL-DT-STDVDRW GA32N
USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0xfa100000 / 3
USB Device: USB to Serial-ATA bridge, 0x04fc (SUNPLUS TECHNOLOGY CO., LTD.), 0x0c25, 0xfa120000 / 6
USB Device: iLok, 0x088e, 0x5036, 0xfa130000 / 5
USB Device: BRCM2046 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 4
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 7
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 2
USB Device: hub_device, 0x0424 (SMSC), 0x2514, 0xfd100000 / 2
USB Device: UM-2G, 0x0582 (Roland Corporation), 0x0106, 0xfd140000 / 5
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 4
USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 3
FireWire Device: Digi 002Rack, Digidesign, 400mbit_speed
thanks everyone
e
Maybe you are looking for
-
Interesting scenario- user facing error while deleting a sales order
Hello All, I have one interesting scenario and want feedback from your side as soon as possible Scenario- One of my clients is facing a problem while deleting a sales order. the sales order he is trying to delete is the old order created in 2007. whe
-
Error in background process.
I have a report that lets you choose between executing in background or not. As far as I see, in both cases the same subroutines are executed, though if you choose to execute directly a list is shown on screen and you are asked to push exec to have t
-
Edit changes do not show in the photo as they are made.
I'm using the trial version of Aperture 3 trying to edit my photos. I've imported them by leaving the originals where they are on my HD. When in the edit mode the changes do not appear in the photo. Nothing happens. I assumed I would see the changes
-
How could I retrieve metadata about Array Type and Table Type?
I use DatabaseMetaData.getUDTs() method for obtain metadata about Object Types, but this method doesn't work with Array Type and Table Type.
-
Any ideas on when the NAC agent will be support on Windows 7? Version 4.6.2.113 installs but doesn't work properly. Thanks