DispatchEvent help
I'm just starting to learn AS3 and I'm trying to create a play button on a menu screen to start a game.
I keep getting MMenu.as,Line20 1137:Incorrect number of arguments. Expected no more than 0.
Every where I look the proper way to handle a dispatchEvent is as shown. Help is greatly appreciated.
package {
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
public class MMenu extends MovieClip {
public var PLAY:Play;
public function MMenu()
PLAY=new Play;
PLAY.x=200;
PLAY.y=300;
addChild(PLAY);
PLAY.addEventListener(MouseEvent.CLICK, go)
public function go(evt:MouseEvent):void
dispatchEvent(new dispatcher(dispatcher.GO)) <---Line 20
use:
package {
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.events.MouseEvent;
public class MMenu extends MovieClip {
public var PLAY:Play;
public function MMenu()
PLAY=new Play;
PLAY.x=200;
PLAY.y=300;
addChild(PLAY);
PLAY.addEventListener(MouseEvent.CLICK, go)
public function go(evt:MouseEvent):void{
dispatchEvent(new Event(dispatcher.GO)); // assuming dispatcher.GO is defined which is unlikely so use:
dispatchEvent(new Event("goEvent"));
Similar Messages
-
Do you know ActionScript? dispatchEvent help needed
I have a .swf file that loads in a .as class file. What I
want to do is the following
The class file dispatches an event called "loadEvtStatus"
When inside of the class, i can trip a function for the event
Problem. How do i listen for the event on the swf
file?It sounds li8ke you need to show the import options when you place your art and select Transparent Background. That option ought to stick until changed.
-
Netbeans 5.0 crashes... please help..
Hi, i just installed netbeans 5.0 with the latest java package. When i first execute the program, it crashes. Below is the error log. Can anyone help me? This is not the first time. I already uninstall and reinstall java and reinstalling netbeans. This same outcome.
# An unexpected error has been detected by HotSpot Virtual Machine:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00d18280, pid=3352, tid=3872
# Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode, sharing)
# Problematic frame:
# J java.awt.GradientPaintContext.clipFillRaster([IIIIIDDD)V
--------------- T H R E A D ---------------
Current thread (0x030081e0): JavaThread "AWT-EventQueue-1" [_thread_in_Java, id=3872]
siginfo: ExceptionCode=0xc0000005, reading address 0xffffffff
Registers:
EAX=0x1cadd928, EBX=0x00000000, ECX=0x1cb53c80, EDX=0x00000000
ESP=0x0365e4f8, EBP=0x0365e528, ESI=0x00000000, EDI=0x00000020
EIP=0x00d18280, EFLAGS=0x00010246
Top of Stack: (sp=0x0365e4f8)
0x0365e4f8: 00000000 00000000 00000000 00000000
0x0365e508: 00ad29fa 00000001 1cadd934 00000000
0x0365e518: 00000000 ffffffff 1c71c71c 3fbc71c7
0x0365e528: 0365e588 00d8e3eb 1c71c71c 3fac71c7
0x0365e538: 00000000 00000000 1c71c71c 3fbc71c7
0x0365e548: 00000000 00000020 00000000 00000000
0x0365e558: 1cadd928 1cb53c80 0365e5ac 00000000
0x0365e568: 00000000 1cadd928 00000000 00000000
Instructions: (pc=0x00d18280)
0x00d18270: dd 45 18 dd 5d f8 8b 7d 24 dd 45 f8 d9 ee d9 c9
0x00d18280: df e9 dd c0 d9 f7 0f 8a 06 00 00 00 0f 86 0e 00
Stack: [0x03620000,0x03660000), sp=0x0365e4f8, free space=249k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J java.awt.GradientPaintContext.clipFillRaster([IIIIIDDD)V
J java.awt.GradientPaintContext.getRaster(IIII)Ljava/awt/image/Raster;
J sun.java2d.pipe.AlphaPaintPipe.renderPathTile(Ljava/lang/Object;[BIIIIII)V
j sun.java2d.pipe.SpanShapeRenderer$Composite.renderBox(Ljava/lang/Object;IIII)V+15
j sun.java2d.pipe.SpanShapeRenderer.spanClipLoop(Ljava/lang/Object;Lsun/java2d/pipe/SpanIterator;Lsun/java2d/pipe/Region;[I)V+56
j sun.java2d.pipe.SpanShapeRenderer.renderSpans(Lsun/java2d/SunGraphics2D;Lsun/java2d/pipe/Region;Ljava/awt/Shape;Lsun/java2d/pipe/ShapeSpanIterator;)V+131
j sun.java2d.pipe.SpanShapeRenderer.renderPath(Lsun/java2d/SunGraphics2D;Ljava/awt/Shape;)V+43
j sun.java2d.pipe.SpanShapeRenderer.fill(Lsun/java2d/SunGraphics2D;Ljava/awt/Shape;)V+33
j sun.java2d.pipe.PixelToShapeConverter.fillPolygon(Lsun/java2d/SunGraphics2D;[I[II)V+14
j sun.java2d.pipe.ValidatePipe.fillPolygon(Lsun/java2d/SunGraphics2D;[I[II)V+17
j sun.java2d.SunGraphics2D.fillPolygon([I[II)V+8
j java.awt.Graphics.fillPolygon(Ljava/awt/Polygon;)V+13
j org.netbeans.swing.tabcontrol.plaf.WinXPEditorTabCellRenderer.paintGradient(Ljava/awt/Graphics;Lorg/netbeans/swing/tabcontrol/plaf/WinXPEditorTabCellRenderer;Lorg/netbeans/swing/tabcontrol/plaf/TabPainter;)V+39
j org.netbeans.swing.tabcontrol.plaf.WinXPEditorTabCellRenderer.access$700(Ljava/awt/Graphics;Lorg/netbeans/swing/tabcontrol/plaf/WinXPEditorTabCellRenderer;Lorg/netbeans/swing/tabcontrol/plaf/TabPainter;)V+3
j org.netbeans.swing.tabcontrol.plaf.WinXPEditorTabCellRenderer$WinXPPainter.paintInterior(Ljava/awt/Graphics;Ljava/awt/Component;)V+8
j org.netbeans.swing.tabcontrol.plaf.AbstractTabCellRenderer.paintComponent(Ljava/awt/Graphics;)V+27
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+260
j org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI.paint(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+404
j javax.swing.plaf.ComponentUI.update(Ljava/awt/Graphics;Ljavax/swing/JComponent;)V+32
j javax.swing.JComponent.paintComponent(Ljava/awt/Graphics;)V+26
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+260
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
j org.netbeans.core.windows.view.ui.MultiSplitPane.paint(Ljava/awt/Graphics;)V+2
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
j javax.swing.JLayeredPane.paint(Ljava/awt/Graphics;)V+73
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
j javax.swing.JLayeredPane.paint(Ljava/awt/Graphics;)V+73
J javax.swing.JComponent.paintChildren(Ljava/awt/Graphics;)V
j javax.swing.JComponent.paint(Ljava/awt/Graphics;)V+292
j javax.swing.JComponent.paintWithOffscreenBuffer(Ljavax/swing/JComponent;Ljava/awt/Graphics;IIIILjava/awt/Image;)V+174
j javax.swing.JComponent.paintDoubleBuffered(Ljavax/swing/JComponent;Ljava/awt/Component;Ljava/awt/Graphics;IIII)Z+131
J javax.swing.JComponent._paintImmediately(IIII)V
j javax.swing.JComponent.paintImmediately(IIII)V+83
j javax.swing.RepaintManager.paintDirtyRegions()V+314
j javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()V+32
j java.awt.event.InvocationEvent.dispatch()V+47
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+26
J java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
V [jvm.dll+0x845a9]
V [jvm.dll+0xd9317]
V [jvm.dll+0x8447a]
V [jvm.dll+0x841d7]
V [jvm.dll+0x9ed69]
V [jvm.dll+0x109fe3]
V [jvm.dll+0x109fb1]
C [MSVCRT.dll+0x2a3b0]
C [kernel32.dll+0xb50b]
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x02d1d188 JavaThread "Image Fetcher 1" daemon [_thread_blocked, id=216]
0x02d00d90 JavaThread "Image Fetcher 0" daemon [_thread_blocked, id=3472]
0x0302df18 JavaThread "Inactive RequestProcessor thread [Was:Parsing Event Queue/org.netbeans.modules.javacore.JMManager$5]" daemon [_thread_blocked, id=3532]
0x032ac270 JavaThread "Inactive RequestProcessor thread [Was:Default RequestProcessor/org.netbeans.modules.editor.errorstripe.AnnotationView$RepaintTask]" daemon [_thread_blocked, id=2444]
0x032d7dd0 JavaThread "Inactive RequestProcessor thread [Was:Default RequestProcessor/org.netbeans.modules.navigator.NavigatorController$ActNodeSetter]" daemon [_thread_blocked, id=2364]
0x02f42500 JavaThread "Inactive RequestProcessor thread [Was:ToolTip-Evaluator/org.netbeans.modules.editor.NbToolTip$Request]" daemon [_thread_blocked, id=1060]
0x02ced900 JavaThread "Inactive RequestProcessor thread [Was:Overriddens Queue/org.netbeans.modules.java.OverrideAnnotationSupport$Request]" daemon [_thread_blocked, id=3868]
0x02e1d7d0 JavaThread "MDR event dispatcher" daemon [_thread_blocked, id=3996]
0x00037b60 JavaThread "DestroyJavaVM" [_thread_blocked, id=900]
=>0x030081e0 JavaThread "AWT-EventQueue-1" [_thread_in_Java, id=3872]
0x031ebb28 JavaThread "TimerQueue" daemon [_thread_blocked, id=2448]
0x031d2b80 JavaThread "Inactive RequestProcessor thread [Was:ListModelSupport loader/org.netbeans.modules.java.navigation.spi.ListModelSupport$Loader]" daemon [_thread_blocked, id=1836]
0x031a6dd8 JavaThread "Inactive RequestProcessor thread [Was:Java Node State Updater/org.netbeans.modules.java.JavaNode$StateUpdater]" daemon [_thread_blocked, id=1788]
0x0316cb90 JavaThread "Inactive RequestProcessor thread [Was:ToolTip-Evaluator/org.netbeans.modules.editor.NbToolTip$Request]" daemon [_thread_blocked, id=3228]
0x02f3d390 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3456]
0x00acf638 JavaThread "AWT-Windows" daemon [_thread_in_native, id=628]
0x02ecd948 JavaThread "AWT-Shutdown" [_thread_blocked, id=2720]
0x00acd950 JavaThread "Timer-0" daemon [_thread_blocked, id=1852]
0x02cd8820 JavaThread "CLI Requests Server" daemon [_thread_in_native, id=1340]
0x00ab7a70 JavaThread "Active Reference Queue Daemon" daemon [_thread_blocked, id=2492]
0x00a70268 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3004]
0x00a6eed8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3440]
0x00a6e1c0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3444]
0x0003fa20 JavaThread "Finalizer" daemon [_thread_blocked, id=3492]
0x00a48aa0 JavaThread "Reference Handler" daemon [_thread_blocked, id=2580]
Other Threads:
0x00a68428 VMThread [id=3628]
0x00a714b8 WatcherThread [id=3752]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 2304K, used 914K [0x1ca70000, 0x1ccf0000, 0x1d440000)
eden space 2048K, 44% used [0x1ca70000, 0x1cb54868, 0x1cc70000)
from space 256K, 0% used [0x1cc70000, 0x1cc70000, 0x1ccb0000)
to space 256K, 0% used [0x1ccb0000, 0x1ccb0000, 0x1ccf0000)
tenured generation total 30272K, used 16957K [0x1d440000, 0x1f1d0000, 0x24a70000)
the space 30272K, 56% used [0x1d440000, 0x1e4cf758, 0x1e4cf800, 0x1f1d0000)
compacting perm gen total 32768K, used 21094K [0x24a70000, 0x26a70000, 0x2aa70000)
the space 32768K, 64% used [0x24a70000, 0x25f098f0, 0x25f09a00, 0x26a70000)
ro space 8192K, 66% used [0x2aa70000, 0x2afcbcc0, 0x2afcbe00, 0x2b270000)
rw space 12288K, 46% used [0x2b270000, 0x2b812060, 0x2b812200, 0x2be70000)
Dynamic libraries:
0x00400000 - 0x0040c000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\java.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\MSVCRT.dll
0x6d6e0000 - 0x6d874000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\client\jvm.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d2f0000 - 0x6d2f8000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d6b0000 - 0x6d6bc000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\java.dll
0x6d6d0000 - 0x6d6df000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\zip.dll
0x6d530000 - 0x6d543000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x76d60000 - 0x76d79000 C:\WINDOWS\system32\iphlpapi.dll
0x76d40000 - 0x76d58000 C:\WINDOWS\system32\MPRAPI.dll
0x77cc0000 - 0x77cf2000 C:\WINDOWS\system32\ACTIVEDS.dll
0x76e10000 - 0x76e35000 C:\WINDOWS\system32\adsldpc.dll
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\NETAPI32.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76b20000 - 0x76b31000 C:\WINDOWS\system32\ATL.DLL
0x774e0000 - 0x7761c000 C:\WINDOWS\system32\ole32.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x76e80000 - 0x76e8e000 C:\WINDOWS\system32\rtutils.dll
0x71bf0000 - 0x71c03000 C:\WINDOWS\system32\SAMLIB.dll
0x77920000 - 0x77a13000 C:\WINDOWS\system32\SETUPAPI.dll
0x71a50000 - 0x71a8f000 C:\WINDOWS\system32\mswsock.dll
0x662b0000 - 0x66308000 C:\WINDOWS\system32\hnetcfg.dll
0x71a90000 - 0x71a98000 C:\WINDOWS\System32\wshtcpip.dll
0x76f20000 - 0x76f47000 C:\WINDOWS\system32\DNSAPI.dll
0x76fb0000 - 0x76fb8000 C:\WINDOWS\System32\winrnr.dll
0x76fc0000 - 0x76fc6000 C:\WINDOWS\system32\rasadhlp.dll
0x0ffd0000 - 0x0fff8000 C:\WINDOWS\system32\rsaenh.dll
0x769c0000 - 0x76a73000 C:\WINDOWS\system32\USERENV.dll
0x6d070000 - 0x6d1d7000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\awt.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
0x5ad70000 - 0x5ada8000 C:\WINDOWS\system32\uxtheme.dll
0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
0x73940000 - 0x73a10000 C:\WINDOWS\system32\D3DIM700.DLL
0x10000000 - 0x10005000 C:\WINDOWS\BricoPacks\Vista Inspirat\ObjectDock\DockShellHook.dll
0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
0x03510000 - 0x0351f000 C:\WINDOWS\BricoPacks\Vista Inspirat\YzToolbar\YzToolBar.dll
0x5d090000 - 0x5d127000 C:\WINDOWS\system32\COMCTL32.dll
0x7c9c0000 - 0x7e77e000 C:\WINDOWS\system32\shell32.dll
0x77f60000 - 0x77ff7000 C:\WINDOWS\system32\SHLWAPI.dll
0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x6d2b0000 - 0x6d2ed000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\fontmanager.dll
0x6d550000 - 0x6d559000 C:\Program Files\Java\jdk1.5.0_06\jre\bin\nio.dll
0x605d0000 - 0x605d9000 C:\WINDOWS\system32\mslbui.dll
0x71b20000 - 0x71b32000 C:\WINDOWS\system32\MPR.dll
0x75f60000 - 0x75f67000 C:\WINDOWS\System32\drprov.dll
0x71c10000 - 0x71c1e000 C:\WINDOWS\System32\ntlanman.dll
0x71cd0000 - 0x71ce7000 C:\WINDOWS\System32\NETUI0.dll
0x71c90000 - 0x71cd0000 C:\WINDOWS\System32\NETUI1.dll
0x71c80000 - 0x71c87000 C:\WINDOWS\System32\NETRAP.dll
0x75f70000 - 0x75f79000 C:\WINDOWS\System32\davclnt.dll
0x77b40000 - 0x77b62000 C:\WINDOWS\system32\appHelp.dll
0x76fd0000 - 0x7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x76980000 - 0x76988000 C:\WINDOWS\system32\LINKINFO.dll
0x03bc0000 - 0x03c09000 C:\WINDOWS\system32\ntshrui.dll
VM Arguments:
jvm_args: -Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade -Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense -Xms32m -Xmx128m -XX:PermSize=32m -XX:MaxPermSize=96m -Xverify:none -Dapple.laf.useScreenMenuBar=true -Dnetbeans.osenv=C:\DOCUME~1\M996F~1.KHA\LOCALS~1\Temp\nbenv3 -Dnetbeans.osenv.nullsep=true -Djdk.home=C:\Program Files\Java\jdk1.5.0_06 -Dnetbeans.home=C:\Program Files\netbeans-5.0\platform6 -Dnetbeans.dirs=C:\Program Files\netbeans-5.0\nb5.0;C:\Program Files\netbeans-5.0\ide6;C:\Program Files\netbeans-5.0\enterprise2;C:\Program Files\netbeans-5.0\harness -Dnetbeans.user=C:\Documents and Settings\M.Khalid\.netbeans\5.0 -Dnetbeans.system_http_proxy=DIRECT -Dsun.awt.keepWorkingSetOnMinimize=true
java_command: org/netbeans/Main --branding nb
Launcher Type: SUN_STANDARD
Environment Variables:
CLASSPATH=.
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\QuickTime\QTSystem\ ; C:\Program Files\Java\jre1.5.0_06\bin
USERNAME=M.Khalid
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse, sse2
Memory: 4k page, physical 514544k(100160k free), swap 1258580k(883052k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_06-b05) for windows-x86, built on Nov 10 2005 11:12:14 by "java_re" with MS VC++ 6.0Did you try asking Netbeans support too?
-
How do I use the event.target.name String with an external dispatchEvent?
...I hope the title question makes sense...
On my stage I have an externally loaded SWF with a button. When clicked the button dispatches an event to the main stage.
On the main stage a listener then loads an SWF into a loader called gallery.
The gallery loader is also being shared by buttons on the main stage which use the event.target.name String to call in SWFs with corresponding names.
I am using Tweens to fade-out and -in content to the gallery when a button is pressed.
Loading the SWFs was working until I tried to create a universal button function for the dispatchEvent buttons...
The problem I have is that I don't know how to define the String to tell the newSWFRequest where to find the SWF when triggered by the external buttons.
(I may be doing this all wrong... but figured the best way to load an SWF on to the main stage from an external SWF was by using dispatchEvent??)
My code triggers the Event and the gallery loader fades out, but then it cannot find the new SWF:
Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
Please can someone help me understand the way to make the String point in the right direction? (I think the only errors are in bold below)
Code:
var myTweenIn2:Tween;
var myTweenOut2:Tween;
var nextLoadS2:String;
// Listen for external event dispatched from external btns
addEventListener("contactStage", btnClickExtrnl);
function btnClickExtrnl(e:Event):void {
nextLoadS2 = ?????
myTweenOut2=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
myTweenOut2.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
// Btns Universal function
function tweenOutCompleteF2(e:TweenEvent){
myTweenOut2.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteF2);
myTweenOut2=null;
var newSWFRequest:URLRequest = new URLRequest("swfs/" + nextLoadS2 + ".swf");
myTweenIn2 = new Tween(gallery, "alpha", None.easeOut, gallery.alpha, 1, 0.2, true);
gallery.load(newSWFRequest);
gallery.x = Xpos;
gallery.y = Ypos;
Thank you.That works – thank you!
I'm now using this code to fade in each of the SWFs:
function contactStage(e:MouseEvent):void {
var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
myTweenIn = new Tween(gallery, "alpha", None.easeOut, 0, 1, 0.2, true);
gallery.load(newSWFRequest);
gallery.x = Xpos;
gallery.y = Ypos;
But I cannot add the fade out function. I have amended the above code to create:
var myTweenOutX:Tween;
var myTweenInX:Tween;
function contactStage(e:MouseEvent):void {
myTweenOutX=new Tween(gallery,"alpha",None.easeOut,gallery.alpha,0,0.2,true);
myTweenOutX.addEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
function tweenOutCompleteFX(e:TweenEvent){
myTweenOutX.removeEventListener(TweenEvent.MOTION_FINISH,tweenOutCompleteFX);
myTweenOutX=null;
var newSWFRequest:URLRequest = new URLRequest("swfs/"+e.currentTarget.name+".swf");
myTweenInX = new Tween(gallery, "alpha", None.easeOut, 0, 1, 0.2, true);
gallery.load(newSWFRequest);
gallery.x = Xpos;
gallery.y = Ypos;
But get this error:
ReferenceError: Error #1069: Property name not found on fl.transitions.Tween and there is no default value.
at ACOUSTIC_fla::MainTimeline/tweenOutCompleteFX()[ACOUSTIC_fla.MainTimeline::frame1:110]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at fl.transitions::Tween/set time()
at fl.transitions::Tween/nextFrame()
at fl.transitions::Tween/onEnterFrame()
Where am I going wrong? -
I suppose it is the problem with socket connection,Please help
Hi,
I'm trying to build a chat server in Java on Linux OS.I've created basically 2 classes in the client program.The first one shows the login window.When we enter the Login ID & password & click on the ok button,the data is sent to the server for verification.If the login is true,the second class is invoked,which displays the messenger window.This class again access the server
for collecting the IDs of the online persons.But this statement which reads from the server causes an exception in the program.If we invoke the second class independently(ie not from 1st class) then there is no problem & the required data is read from the server.Can anyone please help me in getting this program right.I'm working on a p4 machine with JDK1.4.
The Exceptions caused are given below
java.net.SocketException: Connection reset by peer: Connection reset by peer
at java.net.SocketInputStream.SocketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:119)
at java.io.InputStreamReader$CharsetFiller.readBytes(InputStreanReader.java :339)
at java.io.InputStreamReader$CharsetFiller.fill(InputStreamReader.java:374)
at java.io.InputStreamReader.read(InputStreamReader.java:511)
at java.io.BufferedReader.fill(BufferedReader.java:139)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at Login.LoginData(Login.java:330)
at Login.test(Login.java:155)
at Login$Buttonhandler.actionPerformed(Login.java:138)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1722)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:17775)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4141)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:261)
at java.awt.Component.processMouseEvent(Component.java:4906)
at java.awt.Component.processEvent(component.java:4732)
at java.awt.Container.processEvent(Container.java:1337)
at java.awt.component.dispatchEventImpl(Component.java:3476)
at java.awt.Container.dispatchEventImpl(Container.java:1399)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3302)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3014)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2967)
at java.awt.Container.dispatchEventImpl(Container.java:1373)
at java.awt.window.dispatchEventImpl(Window.java:1459)
at java.awt.Component.dispatchEvent(Component.java:3343)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:439)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
My program looks somewhat like this :
1st class definition:
public class Login extends Jframe// Login is the name of the first class;
Socket connection;
DataOutputStream outStream;
BufferedReader inStream;
Frame is set up here
public class Buttonhandler implements ActionListener
public void actionPerformed(ActionEvent e) {
String comm = e.getActionCommand();
if(comm.equals("ok")) {
check=LoginCheck(ID,paswd);
test();
public void test() //checks whether the login is true
if(check)
new Messenger(ID);// the second class is invoked
public boolean LoginCheck(String user,String passwd)
//Enter the Server's IP & port below
String destination="localhost";
int port=1234;
try
connection=new Socket(destination,port);
}catch (UnknownHostException ex){
error("Unknown host");
catch (IOException ex){
ex.printStackTrace ();
error("IO error creating socket ");
try{
inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));
outStream=new DataOutputStream(connection.getOutputStream());
}catch (IOException ex){
error("IO error getting streams");
ex.printStackTrace();
System.out.println("connected to "+destination+" at port "+port+".");
BufferedReader keyboardInput=new BufferedReader(new InputStreamReader(System.in));
String receive=new String();
try{
receive=inStream.readLine();
}catch(IOException ex){ error("Error reading from server");}
if(receive.equals("Logintrue"))
check=true;
else
check=false;
try{
inStream.close();
outStream.close();
connection.close();
}catch (IOException ex){
error("IO error closing socket");
return(check);
// second class is defined below
public class Messenger
Socket connect;
DataOutputStream outStr;
BufferedReader inStr;
public static void main(String args[])
{ Messenger mes = new Messenger(args[0]);}
Messenger(String strg)
CreateWindow();
setupEvents();
LoginData(strg);
fram.show();
void setupEvents()
fram.addWindowListener(new WindowHandler());
login.addActionListener(new MenuItemHandler());
quit.addActionListener(new MenuItemHandler());
button.addActionListener(new Buttonhandle());
public void LoginData(String name)
//Enter the Server's IP & port below
String dest="localhost";
int port=1234;
int r=0;
String str[]=new String[40];
try
connect=new Socket(dest,port);
}catch (UnknownHostException ex){
error("Unknown host");
catch (IOException ex){
ex.printStackTrace ();
error("IO error creating socket ");
try{
inStr = new BufferedReader(new InputStreamReader(connect.getInputStream()));
outStr=new DataOutputStream(connect.getOutputStream());
}catch (IOException ex){
error("IO error getting streams");
ex.printStackTrace();
String codeln=new String("\n");
try{
outStr.flush();
outStr.writeBytes("!@*&!@#$%^");//code for sending logged in users
outStr.writeBytes(codeln);
outStr.write(13);
outStr.flush();
String check="qkpltx";
String receive=new String();
try{
while((receive=inStr.readLine())!=null) //the statement that causes the exception
if(receive.equals(check))
break;
else
str[r]=receive;
r++;
}catch(IOException ex){ex.printStackTrace();error("Error reading from socket");}
catch(NullPointerException ex){ex.printStackTrace();}
} catch (IOException ex){ex.printStackTrace();
error("Error reading from keyboard or socket ");
try{
inStr.close();
outStr.close();
connect.close();
}catch (IOException ex){
error("IO error closing socket");
for(int l=0,k=1;l<r;l=l+2,k++)
if(!(str[l].equals(name)))
stud[k]=" "+str[l];
else
k--;
public class Buttonhandle implements ActionListener
public void actionPerformed(ActionEvent e) {
//chat with the selected user;
public class MenuItemHandler implements ActionListener
public void actionPerformed(ActionEvent e)
String cmd=e.getActionCommand();
if(cmd.equals("Disconnect"))
//Disconnect from the server
else if(cmd.equals("Change User"))
//Disconnect from the server & call the login window
else if(cmd.equals("View Connection Details"))
//show connection details;
public class WindowHandler extends WindowAdapter
public void windowClosing(WindowEvent e){
//Disconnect from server & then exit;
System.exit(0);}
I�ll be very thankful if anyone corrects the mistake for me.Please help.You're connecting to the server twice. After you've successfully logged in, pass the Socket to the Messenger class.
public class Messenger {
Socket connect;
public static void main(String args[]) {
Messenger mes = new Messenger(args[0]);
Messenger(Socket s, String strg) {
this.connect = s;
CreateWindow();
setupEvents();
LoginData(strg);
fram.show();
} -
Please help: RMI and Swing/AWT issue
Hi guys, I've been having a lot of trouble trying to get a GUI application to work with RMI. I'd appreciate any help. Here's the story:
I wrote a Java application and its GUI using Netbeans. In a nutshell, the application is about performing searches. I am now at the point where I need exterior programs to use my application's search capabilities, thus needing RMI. Such exterior programs are to call methods currently implemented in my application.
I implemented RMI, and got the client --> server communication working. However, the GUI just breaks. It starts outputting exceptions, gets delayed, doesn't update properly, some parts of it stop working.... basically hysterical behavior.
Now take a look at this line within my server class:
Naming.rebind("SearchProgram", mySearchProgram);
If I take it out, RMI obviously does not work... but the application and its GUI work flawlessly. If I put it in, the RMI calls work, but the GUI's above symptoms occur again. Among the symptoms are null pointer exceptions which all look similar, are related to "AWT-EventQueue-0", and keep ocurring. Here's just snippet of the errors outputted:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(MetalScrollBarUI.java:102)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.JScrollBar.getMinimumSize(JScrollBar.java:704)
at javax.swing.ScrollPaneLayout.minimumLayoutSize(ScrollPaneLayout.java:624)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
at java.awt.Container.minimumSize(Container.java:1598)
at java.awt.Container.getMinimumSize(Container.java:1583)
at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:433)
at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:375)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validateTree(Container.java:1480)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:400)
at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:310)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
at javax.swing.BoxLayout.checkRequests(BoxLayout.java:434)
at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:251)
at javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(DefaultMenuLayout.java:38)
at java.awt.Container.preferredSize(Container.java:1558)
at java.awt.Container.getPreferredSize(Container.java:1543)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
at javax.swing.JRootPane$RootLayout.layoutContainer(JRootPane.java:910)
at java.awt.Container.layout(Container.java:1401)
at java.awt.Container.doLayout(Container.java:1390)
at java.awt.Container.validateTree(Container.java:1473)
at java.awt.Container.validate(Container.java:1448)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
There are no complaints about anything within my code, it's all GUI related whenever I make a bind() or rebind() call.
Again, any help here would be great... cause this one's just beating me.
Thanks!Maybe you want to change that worker thread to
not do RMI but anything else (dummy data) to see if it really is RMI, I doubt it, I think you are updating some structures that have to do with swing GUI and hence you will hang.
Just check this out. -
Exception error !Please help me!
Exception in thread "AWT-EventQueue-0" java.lang.ArithmeticException: / by zero
at rational.<init>(rational.java:32)
at rationalnumber$ButtonHandler.actionPerformed(rationalnumber.java:86)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Source Code: Class rationalnumber
import java.awt.FlowLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JOptionPane;
public class rationalnumber extends JFrame {
private JLabel numerator1;
private JLabel denominator1;
private JLabel numerator2;
private JLabel denominator2;
private JLabel precision;
private JTextField numerator_value1;
private JTextField denominator_value1;
private JTextField numerator_value2;
private JTextField denominator_value2;
private JTextField precision_value;
private JButton add_value;
private JButton subtract_value;
private JButton multiply_value;
private JButton divide_value;
int number1;
int number2;
int number3;
int number4;
int number5;
public rationalnumber() {
super("Applet Viewer:Rational Number's Calculation");
setLayout(new FlowLayout());
numerator1=new JLabel("Enter numerator 1:");
add(numerator1);
numerator_value1=new JTextField("Enter Number");
add(numerator_value1);
denominator1=new JLabel("Enter denominator 1:");
add(denominator1);
denominator_value1=new JTextField("Enter Number");
add(denominator_value1);
numerator2=new JLabel("Enter numerator 2:");
add(numerator2);
numerator_value2=new JTextField("Enter Number");
add(numerator_value2);
denominator2=new JLabel("Enter denominator 2:");
add(denominator2);
denominator_value2=new JTextField("Enter Number");
add(denominator_value2);
precision=new JLabel("Enter precision:");
add(precision);
precision_value=new JTextField("Enter number");
add(precision_value);
add_value=new JButton("Add");
add(add_value);
subtract_value=new JButton("Subtract");
add(subtract_value);
multiply_value=new JButton("Multiply");
add(multiply_value);
divide_value=new JButton("Divide");
add(divide_value);
ButtonHandler handler=new ButtonHandler();
numerator_value1.addActionListener(handler);
denominator_value1.addActionListener(handler);
numerator_value2.addActionListener(handler);
denominator_value2.addActionListener(handler);
add_value.addActionListener(handler);
subtract_value.addActionListener(handler);
multiply_value.addActionListener(handler);
divide_value.addActionListener(handler);
private class ButtonHandler implements ActionListener {
public void actionPerformed(ActionEvent event) {
if(event.getSource()==numerator_value1) {
number1=Integer.parseInt(event.getActionCommand());
else if(event.getSource()==denominator_value1) {
number2=Integer.parseInt(event.getActionCommand());
else if(event.getSource()==numerator_value2) {
number3=Integer.parseInt(event.getActionCommand());
else if(event.getSource()==denominator_value2) {
number4=Integer.parseInt(event.getActionCommand());
else if(event.getSource()==add_value) {
rational calculation=new rational(number1,number2,number3,number4);
JOptionPane.showMessageDialog(rationalnumber.this,String.format("a+b= %d",calculation.getAddResult()));
else if(event.getSource()==subtract_value) {
rational calculation=new rational(number1,number2,number3,number4);
JOptionPane.showMessageDialog(rationalnumber.this,String.format("a-b= %f",calculation.getSubtractResult()));
else if(event.getSource()==multiply_value) {
rational calculation=new rational(number1,number2,number3,number4);
JOptionPane.showMessageDialog(rationalnumber.this,String.format("a*b= %f",calculation.getMultiplyResult()));
else if(event.getSource()==divide_value) {
ational calculation=new rational(number1,number2,number3,number4);
JOptionPane.showMessageDialog(rationalnumber.this,String.format("a/b= %f",calculation.getDivideResult()));
Related source code: class rational
class rational {
private int numerator;
private int denominator;
private int numerator3;
private int denominator3;
float rationalnum1;
float rationalnum2;
private int number[]={2,3,4,5,6,7,8,9,11,13,17,19,21,23,27,29,31,33,37,39,41,43,47,49,51,53,57,59,61,63,67,69,71,73,77,79,81,83,87,89,91,93,97,99};
public rational(int numerator1,int denominator1,int numerator2,int denominator2) {
if(numerator1%denominator1==0) {
rationalnum1=numerator1/denominator1;
else if(numerator1%denominator1!=0) {
for(int i=0;i<number.length;i++) {
for(;(numerator1%number==0)&&(denominator1%number[i]==0);) {
numerator=numerator1/number[i];
denominator=denominator1/number[i];
rationalnum1=numerator/denominator;
if(numerator2%denominator2==0) {
rationalnum2=numerator2/denominator2;
else if(numerator2%denominator2!=0) {
for(int i=0;i<number.length;i++) {
for(;(numerator2%number[i]==0)&&(denominator2%number[i]==0);) {
numerator3=numerator2/number[i];
denominator3=denominator2/number[i];
rationalnum2=numerator3/denominator3;
public rational() {
numerator=12;
denominator=3;
rationalnum1=numerator/denominator;
numerator3=34;
denominator3=5;
rationalnum2=numerator3/denominator3;
public float getAddResult() {
return rationalnum1+rationalnum2;
public float getSubtractResult() {
return rationalnum1-rationalnum2;
public float getMultiplyResult() {
return rationalnum1*rationalnum2;
public float getDivideResult() {
return rationalnum1/rationalnum2;
Related Source Code: class ButtonTest
import javax.swing.JFrame;
public class ButtonTest {
public static void main(String args[]) {
rationalnumber buttonframe=new rationalnumber();
buttonframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
buttonframe.setSize(120,320);
buttonframe.setVisible(true);Please use [co[/b]de] and [co[/b]de] tags when pasting code. There's a code button when you enter your message. Also, It will make it easier for you to get help if you follow Java conventions for naming classes. Class names should start with a captial letter.
Exception in thread "AWT-EventQueue-0"
java.lang.ArithmeticException: / by zero at rational.<init>(rational.java:32)This part of the error tells you that the error is divide by zero, that the error occurred in the rational class constructor (that's what <init> means) and that the error occurred on line number 32 of the rational.java file.
So your task is to find line number 32 and see why there is a divide by zero. I am guessing that line number 32 is rationalnum2=numerator3/denominator3;Here's a hint. In almost any computer language, if you divide an int by an int, the result is an int and the fractional part of the result is thrown away. So dividing 8 by 3 results in the number 2. -
Help with an If Statement for a Message Dialog
Hello all! I need help yet once again! I would prefer hints and nudges rather then the answer please, as this is for a homework assignment. Okay I am supposed to write a program that has 3 text boxes to enter a number between 0 and 255 (for red green and blue) and then the user should push the show button and the background color should change, which I have all working! But I am supposed to have a " gracefully handle the situation where the user enters an invalid color value (any number less than zero or greater than 255)" and I have the if statement written, but for some reason, whenever I hit the show button it always pops up that window, no matter what the user types in. So I need help figuring out how to make it stop popping up all of the time! Here is the code: Any other ideas on how to make the code better would be much appreciated!!! Thanks in advance!
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JPanel;
import javax.swing.BorderFactory;
public class ColorEditor extends JPanel {
private JLabel labelRed;
private JLabel labelGreen;
private JLabel labelBlue;
private JTextField textFieldRed;
private JTextField textFieldGreen;
private JTextField textFieldBlue;
private JButton showButton;
private JButton exitButton;
private JOptionPane optionPane;
public ColorEditor()
super(new BorderLayout());
labelRed = new JLabel("red: ");
textFieldRed = new JTextField(5);
labelGreen = new JLabel("green: ");
textFieldGreen = new JTextField(5);
labelBlue = new JLabel("blue: ");
textFieldBlue = new JTextField(5);
showButton = new JButton("show");
exitButton = new JButton("exit");
JPanel labelPane = new JPanel(new GridLayout(0,1));
labelPane.add(labelRed);
labelPane.add(labelGreen);
labelPane.add(labelBlue);
labelPane.add(showButton);
JPanel fieldPane = new JPanel( new GridLayout(0,1));
fieldPane.add(textFieldRed);
fieldPane.add(textFieldGreen);
fieldPane.add(textFieldBlue);
fieldPane.add(exitButton);
setBorder(BorderFactory.createEmptyBorder(40,40,40,40));
add(labelPane, BorderLayout.LINE_START);
add(fieldPane, BorderLayout.CENTER);
TextFieldHandler handler = new TextFieldHandler();
textFieldRed.addActionListener(handler);
textFieldGreen.addActionListener(handler);
textFieldBlue.addActionListener(handler);
showButton.addActionListener(handler);
private class TextFieldHandler implements ActionListener
public void actionPerformed(ActionEvent event)
if (event.getSource() == showButton)
String textRed = textFieldRed.getText();
String textGreen = textFieldGreen.getText();
String textBlue = textFieldBlue.getText();
int a = Integer.parseInt(textRed);
int b = Integer.parseInt(textGreen);
int c = Integer.parseInt(textBlue);
if ((a < 0) || (a > 255)||(b<0)||(b>255)||(c<0)||(c>255));
optionPane.showMessageDialog(null, "Please enter a number between 0 and 255!");//HERE IS WHERE I NEED THE HELP!!
Color colorObject = new Color(a,b,c);
setBackground(colorObject);
public static void main(String args[])
JFrame frame = new JFrame("Color Editor");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
frame.add(new ColorEditor());
frame.pack();
frame.setVisible(true);
}Okay now Eclipse is giving me a really funky error that I cannot quite figure out (in the compiler) but my program is running fine.... Can you help me with this too?
Here is what the compiler is giving me....
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Color parameter outside of expected range: Green
+ at java.awt.Color.testColorValueRange(Unknown Source)+
+ at java.awt.Color.<init>(Unknown Source)+
+ at java.awt.Color.<init>(Unknown Source)+
+ at ColorEditor$TextFieldHandler.actionPerformed(ColorEditor.java:80)+
+ at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)+
+ at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)+
+ at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)+
+ at javax.swing.DefaultButtonModel.setPressed(Unknown Source)+
+ at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)+
+ at java.awt.Component.processMouseEvent(Unknown Source)+
+ at javax.swing.JComponent.processMouseEvent(Unknown Source)+
+ at java.awt.Component.processEvent(Unknown Source)+
+ at java.awt.Container.processEvent(Unknown Source)+
+ at java.awt.Component.dispatchEventImpl(Unknown Source)+
+ at java.awt.Container.dispatchEventImpl(Unknown Source)+
+ at java.awt.Component.dispatchEvent(Unknown Source)+
+ at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)+
+ at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)+
+ at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)+
+ at java.awt.Container.dispatchEventImpl(Unknown Source)+
+ at java.awt.Window.dispatchEventImpl(Unknown Source)+
+ at java.awt.Component.dispatchEvent(Unknown Source)+
+ at java.awt.EventQueue.dispatchEvent(Unknown Source)+
+ at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)+
+ at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)+
+ at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)+
+ at java.awt.EventDispatchThread.pumpEvents(Unknown Source)+
+ at java.awt.EventDispatchThread.pumpEvents(Unknown Source)+
+ at java.awt.EventDispatchThread.run(Unknown Source)+ -
Help using a web service.
Ok to Start off I havent used java for a while now, but was asked to create a small program that can enter and pull items from a database and send them to a web service. Trouble is I am not familiar with this type of operation. I cant seem to find a good tutorial out there that has helped me so here I go. My WSDL is http://wservicecrt.cerner.com/SRWeb/...SR_INVOKE.wsdl and I will need to take information gathered by the database portion of my program and send it to this web service. There is a class called ProSr that will contain all of the information I need to send to the service.
here is the code i use to call the service.
System.out.println("create");
try { // Call Web Service Operation
desktopapplication1.INVOKEINVOKEHttpService service = new desktopapplication1.INVOKEINVOKEHttpService();
desktopapplication1.INVOKE port = service.getINVOKEINVOKEHttpPort();
// TODO initialize WS operation arguments here
desktopapplication1.SR serviceRequest = new desktopapplication1.SR();
javax.xml.ws.Holder<java.lang.String> serviceRequestNumber = new javax.xml.ws.Holder<java.lang.String>();
javax.xml.ws.Holder<java.lang.String> serviceRequestId = new javax.xml.ws.Holder<java.lang.String>();
javax.xml.ws.Holder<java.lang.String> serviceRequestIntegrationId = new javax.xml.ws.Holder<java.lang.String>();
serviceRequest.setSummary("Testing SR Creation");
serviceRequest.setStatus("Open");
serviceRequest.setClientMnemonic("UNIV_MO");
serviceRequest.setSeverity("3: Moderate Impact");
serviceRequest.setContactLoginId("SW019489");
serviceRequest.setSource("Proactive Intervention");
serviceRequest.setSubstatus("Unassigned");
serviceRequest.setOwner("SW019489");
serviceRequestNumber.value = "";
serviceRequestId.value = "";
serviceRequestIntegrationId.value = "";
ups.setServiceRequest(serviceRequest);
port.upsert(serviceRequest, serviceRequestNumber, serviceRequestId, serviceRequestIntegrationId);
} catch (Exception ex) {
// TODO handle custom exceptions here
}code}Here is the error code i'm receiving
com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.ConnectException: Connection refused: connect
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy32.upsert(Unknown Source)
at desktopapplication1.DesktopApplication1View.Create(DesktopApplication1View.java:772)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6263)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
at java.awt.Component.processEvent(Component.java:6028)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:839)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:904)
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:109)
... 46 moreand here is my WSDL file
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions name="INVOKE_INVOKEHttp_Service" targetNamespace="http://SR_LIB/INVOKE/Binding" xmlns:Port_0="http://SR_LIB/INVOKE" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:this="http://SR_LIB/INVOKE/Binding" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:import location="INVOKE.wsdl" namespace="http://SR_LIB/INVOKE" />
- <wsdl:binding name="INVOKE_INVOKEHttpBinding" type="Port_0:INVOKE">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="UPSERT">
<soap:operation soapAction="" />
- <wsdl:input name="UPSERTRequest">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="UPSERTResponse">
<soap:body use="literal" />
</wsdl:output>
- <wsdl:fault name="Fault">
<soap:fault name="Fault" use="literal" />
</wsdl:fault>
</wsdl:operation>
- <wsdl:operation name="Query">
<soap:operation soapAction="" />
- <wsdl:input name="QueryRequest">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="QueryResponse">
<soap:body use="literal" />
</wsdl:output>
- <wsdl:fault name="Fault">
<soap:fault name="Fault" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="INVOKE_INVOKEHttpService">
- <wsdl:port binding="this:INVOKE_INVOKEHttpBinding" name="INVOKE_INVOKEHttpPort">
<soap:address location="http://wservicecrt.cerner.com:9080/SRWeb/sca/INVOKE" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>Can anyone help me out or give me some advice? -
Help with this crash report?
Can anyone give me a hand with this? Safari crashes almost instantly after startup.
Date/Time: 2006-11-18 07:59:59.310 +0100
OS Version: 10.4.8 (Build 8L127)
Report Version: 4
Command: Safari
Path: /Applications/Safari.app/Contents/MacOS/Safari
Parent: WindowServer [58]
Version: 2.0.4 (419.3)
Build Version: 1
Project Name: WebBrowser
Source Version: 4190300
PID: 383
Thread: 0
Exception: EXCBADACCESS (0x0001)
Codes: KERNPROTECTIONFAILURE (0x0002) at 0x00000025
Thread 0 Crashed:
0 com.apple.WebCore 0x95865b58 DOM::NodeImpl::setChanged(bool) + 52
1 com.apple.WebCore 0x95972eb0 DOM::DocumentImpl::setCSSTarget(DOM::NodeImpl*) + 44
2 com.apple.WebCore 0x95972cf4 KHTMLPart::gotoAnchor(QString const&) + 532
3 com.apple.WebCore 0x95903f20 KHTMLPart::gotoAnchor() + 64
4 com.apple.WebCore 0x9599a2e4 KWQKHTMLPart::scrollToAnchor(KURL const&) + 136
5 com.apple.WebCore 0x959adb58 -[WebCoreBridge scrollToAnchorWithURL:] + 108
6 com.apple.WebKit 0x956cfbd0 -[WebFrame(WebPrivate) _continueFragmentScrollAfterNavigationPolicy:formState:] + 192
7 com.apple.WebKit 0x956a7adc -[WebFrame(WebPrivate) _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:] + 680
8 com.apple.WebKit 0x956a96bc -[WebBridge loadURL:referrer:reload:userGesture:target:triggeringEvent:form:formValues:] + 244
9 com.apple.WebCore 0x959233ac KWQKHTMLPart::urlSelected(KURL const&, int, int, KParts::URLArgs const&) + 768
10 com.apple.WebCore 0x9592305c KHTMLPart::urlSelected(QString const&, int, int, QString const&, KParts::URLArgs) + 1412
11 com.apple.WebCore 0x958fbf64 DOM::HTMLAnchorElementImpl::defaultEventHandler(DOM::EventImpl*) + 1644
12 com.apple.WebCore 0x958e81d4 DOM::NodeImpl::dispatchGenericEvent(DOM::EventImpl*, int&) + 832
13 com.apple.WebCore 0x958e7d0c DOM::NodeImpl::dispatchEvent(DOM::EventImpl*, int&, bool) + 128
14 com.apple.WebCore 0x958ec914 KHTMLView::dispatchMouseEvent(int, DOM::NodeImpl*, bool, int, QMouseEvent*, bool, int) + 2040
15 com.apple.WebCore 0x959107b0 KHTMLView::viewportMouseReleaseEvent(QMouseEvent*) + 824
16 com.apple.WebCore 0x959103cc KWQKHTMLPart::mouseUp(NSEvent*) + 288
17 com.apple.WebKit 0x956a9598 -[WebHTMLView mouseUp:] + 88
18 com.apple.AppKit 0x93746900 -[NSWindow sendEvent:] + 4728
19 com.apple.Safari 0x00021734 0x1000 + 132916
20 com.apple.AppKit 0x936ef8d4 -[NSApplication sendEvent:] + 4172
21 com.apple.Safari 0x00021238 0x1000 + 131640
22 com.apple.AppKit 0x936e6d10 -[NSApplication run] + 508
23 com.apple.AppKit 0x937d787c NSApplicationMain + 452
24 com.apple.Safari 0x0005c77c 0x1000 + 374652
25 com.apple.Safari 0x0005c624 0x1000 + 374308
Thread 1:
0 libSystem.B.dylib 0x9000ab48 machmsgtrap + 8
1 libSystem.B.dylib 0x9000aa9c mach_msg + 60
2 com.apple.CoreFoundation 0x907dcb78 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x907dc47c CFRunLoopRunSpecific + 268
4 com.apple.Foundation 0x92970164 -[NSRunLoop runMode:beforeDate:] + 172
5 com.apple.Foundation 0x9297009c -[NSRunLoop run] + 76
6 com.apple.WebKit 0x95689f70 +[WebFileDatabase _syncLoop:] + 176
7 com.apple.Foundation 0x92961194 forkThreadForFunction + 108
8 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 2:
0 libSystem.B.dylib 0x9000ab48 machmsgtrap + 8
1 libSystem.B.dylib 0x9000aa9c mach_msg + 60
2 com.apple.CoreFoundation 0x907dcb78 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x907dc47c CFRunLoopRunSpecific + 268
4 com.apple.Foundation 0x9298869c +[NSURLConnection(NSURLConnectionInternal) _resourceLoadLoop:] + 264
5 com.apple.Foundation 0x92961194 forkThreadForFunction + 108
6 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 3:
0 libSystem.B.dylib 0x9000ab48 machmsgtrap + 8
1 libSystem.B.dylib 0x9000aa9c mach_msg + 60
2 com.apple.CoreFoundation 0x907dcb78 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x907dc47c CFRunLoopRunSpecific + 268
4 com.apple.Foundation 0x929897dc +[NSURLCache _diskCacheSyncLoop:] + 152
5 com.apple.Foundation 0x92961194 forkThreadForFunction + 108
6 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 4:
0 libSystem.B.dylib 0x9001f08c select + 12
1 com.apple.CoreFoundation 0x907ef40c __CFSocketManager + 472
2 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 5:
0 libSystem.B.dylib 0x9002bbc8 semaphorewait_signaltrap + 8
1 libSystem.B.dylib 0x900306ac pthreadcondwait + 480
2 com.apple.Foundation 0x92968300 -[NSConditionLock lockWhenCondition:] + 68
3 com.apple.Syndication 0x9a4db42c -[AsyncDB _run:] + 192
4 com.apple.Foundation 0x92961194 forkThreadForFunction + 108
5 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 6:
0 libSystem.B.dylib 0x9002bbc8 semaphorewait_signaltrap + 8
1 libSystem.B.dylib 0x900306ac pthreadcondwait + 480
2 com.apple.Foundation 0x92968300 -[NSConditionLock lockWhenCondition:] + 68
3 com.apple.AppKit 0x93787708 -[NSUIHeartBeat _heartBeatThread:] + 324
4 com.apple.Foundation 0x92961194 forkThreadForFunction + 108
5 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 7:
0 libSystem.B.dylib 0x9002e88c kevent + 12
1 com.apple.DesktopServices 0x92875250 TFSNotificationTask::FSNotificationTaskProc(void*) + 56
2 ...ple.CoreServices.CarbonCore 0x90bc28b0 PrivateMPEntryPoint + 76
3 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 8:
0 libSystem.B.dylib 0x9002bbc8 semaphorewait_signaltrap + 8
1 libSystem.B.dylib 0x900306ac pthreadcondwait + 480
2 ...ple.CoreServices.CarbonCore 0x90bc2aa0 MPWaitOnQueue + 224
3 com.apple.DesktopServices 0x928758cc TNodeSyncTask::SyncTaskProc(void*) + 116
4 ...ple.CoreServices.CarbonCore 0x90bc28b0 PrivateMPEntryPoint + 76
5 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 9:
0 libSystem.B.dylib 0x9000ab48 machmsgtrap + 8
1 libSystem.B.dylib 0x9000aa9c mach_msg + 60
2 com.apple.CoreFoundation 0x907dcb78 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x907dc47c CFRunLoopRunSpecific + 268
4 com.apple.CoreFoundation 0x907eb8dc CFRunLoopRun + 52
5 com.apple.QuickTime 0x947d9f70 QTSNetworkThread_RunThread + 128
6 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 10:
0 libSystem.B.dylib 0x9000ab48 machmsgtrap + 8
1 libSystem.B.dylib 0x9000aa9c mach_msg + 60
2 com.apple.CoreFoundation 0x907dcb78 __CFRunLoopRun + 832
3 com.apple.CoreFoundation 0x907dc47c CFRunLoopRunSpecific + 268
4 com.apple.audio.CoreAudio 0x9145463c HALRunLoop::OwnThread(void*) + 264
5 com.apple.audio.CoreAudio 0x914543dc CAPThread::Entry(CAPThread*) + 96
6 libSystem.B.dylib 0x9002b508 pthreadbody + 96
Thread 0 crashed with PPC Thread State 64:
srr0: 0x0000000095865b58 srr1: 0x000000000200f030 vrsave: 0x00000000fff00000
cr: 0x48024224 xer: 0x0000000020000003 lr: 0x0000000095972eb0 ctr: 0x0000000000000009
r0: 0x000000000c32d860 r1: 0x00000000bfffd860 r2: 0x0000000000000001 r3: 0x000000000c32d030
r4: 0x0000000000000001 r5: 0x0000000000000000 r6: 0x00000000ffffffff r7: 0x0000000000000001
r8: 0x0000000000000000 r9: 0x0000000000000001 r10: 0x0000000000000001 r11: 0x0000000048022222
r12: 0x000000009000608c r13: 0x0000000000000000 r14: 0x0000000000000001 r15: 0x0000000000000000
r16: 0x00000000a58484a0 r17: 0x0000000000000001 r18: 0x00000000a5697834 r19: 0x00000000006a18e0
r20: 0x0000000000000000 r21: 0x0000000000000000 r22: 0x000000000e2b8300 r23: 0x000000000f647ef0
r24: 0x0000000000000000 r25: 0x0000000000000001 r26: 0x00000000101eac00 r27: 0x00000000bfffd9a0
r28: 0x00000000120c4030 r29: 0x0000000004c3fcb0 r30: 0x00000000120c4030 r31: 0x0000000095972af4
Binary Images Description:
0x1000 - 0xdcfff com.apple.Safari 2.0.4 (419.3) /Applications/Safari.app/Contents/MacOS/Safari
0x767000 - 0x768fff com.apple.aoa.halplugin 2.5.6 (2.5.6b5) /System/Library/Extensions/IOAudioFamily.kext/Contents/PlugIns/AOAHALPlugin.bun dle/Contents/MacOS/AOAHALPlugin
0x51d6000 - 0x51d8fff com.apple.textencoding.unicode 2.0 /System/Library/TextEncodings/Unicode Encodings.bundle/Contents/MacOS/Unicode Encodings
0x5cdf000 - 0x5fe8fff com.macromedia.Flash Player.plugin 9.0.0 (1.0.4f20) /Library/Internet Plug-Ins/Flash Player.plugin/Contents/MacOS/Flash Player
0x7c0b000 - 0x7c18fff com.apple.quicktime.webplugin 7.1.3 /Library/Internet Plug-Ins/QuickTime Plugin.webplugin/Contents/MacOS/QuickTime Plugin
0x7c61000 - 0x7c65fff com.apple.iokit.IOQTComponents 1.4 /System/Library/Components/IOQTComponents.component/Contents/MacOS/IOQTComponen ts
0x7cac000 - 0x7cb2fff com.apple.ATIRadeon9700GA 1.4.18 (4.1.8) /System/Library/Extensions/ATIRadeon9700GA.plugin/Contents/MacOS/ATIRadeon9700G A
0x81b9000 - 0x81d2fff GLDriver /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLDriver.bundl e/GLDriver
0x8242000 - 0x8244fff com.apple.PDFImporter 1.6 (???) /System/Library/Components/PDFImporter.component/Contents/MacOS/PDFImporter
0x82ee000 - 0x8309fff GLRendererFloat /System/Library/Frameworks/OpenGL.framework/Versions/A/Resources/GLRendererFloa t.bundle/GLRendererFloat
0x90b0000 - 0x90e9fff com.apple.audio.SoundManager.Components 3.9.1 /System/Library/Components/SoundManagerComponents.component/Contents/MacOS/Soun dManagerComponents
0x9147000 - 0x9161fff com.apple.AppleIntermediateCodec 1.1 (141) /Library/QuickTime/AppleIntermediateCodec.component/Contents/MacOS/AppleInterme diateCodec
0x93a2000 - 0x93e1fff com.apple.QuickTimeFireWireDV.component 7.1.3 /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTim eFireWireDV
0x93ec000 - 0x9465fff com.apple.applepixletvideo 1.2.5 (1.2d5) /System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ApplePixlet Video
0x9a19000 - 0x9b28fff GLEngine /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine
0x9b57000 - 0x9c47fff com.apple.ATIRadeon9700GLDriver 1.4.18 (4.1.8) /System/Library/Extensions/ATIRadeon9700GLDriver.bundle/Contents/MacOS/ATIRadeo n9700GLDriver
0x8fe00000 - 0x8fe51fff dyld 45.3 /usr/lib/dyld
0x90000000 - 0x901bcfff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x90214000 - 0x90219fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x9021b000 - 0x90268fff com.apple.CoreText 1.0.2 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreText.framework/Versions/A/CoreText
0x90293000 - 0x90344fff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/ATS
0x90373000 - 0x9072dfff com.apple.CoreGraphics 1.258.38 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/CoreGraphics
0x907ba000 - 0x90893fff com.apple.CoreFoundation 6.4.6 (368.27) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x908dc000 - 0x908dcfff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x908de000 - 0x909e0fff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x90a3a000 - 0x90abefff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90ae8000 - 0x90b58fff com.apple.framework.IOKit 1.4 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90b6e000 - 0x90b80fff libauto.dylib /usr/lib/libauto.dylib
0x90b87000 - 0x90e5efff com.apple.CoreServices.CarbonCore 681.7 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore
0x90ec4000 - 0x90f44fff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServi ces.framework/Versions/A/OSServices
0x90f8e000 - 0x90fcffff com.apple.CFNetwork 4.0 (129.18) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwo rk.framework/Versions/A/CFNetwork
0x90fe4000 - 0x90ffcfff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServ icesCore.framework/Versions/A/WebServicesCore
0x9100c000 - 0x9108dfff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchK it.framework/Versions/A/SearchKit
0x910d3000 - 0x910fdfff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadat a.framework/Versions/A/Metadata
0x9110e000 - 0x9111cfff libz.1.dylib /usr/lib/libz.1.dylib
0x9111f000 - 0x912dafff com.apple.security 4.5 (28992) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x913d8000 - 0x913e1fff com.apple.DiskArbitration 2.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x913e8000 - 0x91410fff com.apple.SystemConfiguration 1.8.3 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfi guration
0x91423000 - 0x9142efff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
0x91433000 - 0x9143bfff libbsm.dylib /usr/lib/libbsm.dylib
0x9143f000 - 0x914bafff com.apple.audio.CoreAudio 3.0.4 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x914f7000 - 0x914f7fff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Application Services
0x914f9000 - 0x91531fff com.apple.AE 1.5 (297) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ AE.framework/Versions/A/AE
0x9154c000 - 0x91619fff com.apple.ColorSync 4.4.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ColorSync.framework/Versions/A/ColorSync
0x9166e000 - 0x916fffff com.apple.print.framework.PrintCore 4.6 (177.13) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ PrintCore.framework/Versions/A/PrintCore
0x91746000 - 0x917fdfff com.apple.QD 3.10.21 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ QD.framework/Versions/A/QD
0x9183a000 - 0x91898fff com.apple.HIServices 1.5.3 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ HIServices.framework/Versions/A/HIServices
0x918c7000 - 0x918ebfff com.apple.LangAnalysis 1.6.1 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LangAnalysis.framework/Versions/A/LangAnalysis
0x918ff000 - 0x91924fff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ FindByContent.framework/Versions/A/FindByContent
0x91937000 - 0x91979fff com.apple.LaunchServices 181 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ LaunchServices.framework/Versions/A/LaunchServices
0x91995000 - 0x919a9fff com.apple.speech.synthesis.framework 3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x919b7000 - 0x919f9fff com.apple.ImageIO.framework 1.5.0 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/ImageIO
0x91a0f000 - 0x91ad7fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
0x91b25000 - 0x91b3afff libcups.2.dylib /usr/lib/libcups.2.dylib
0x91b3f000 - 0x91b5dfff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x91b63000 - 0x91bd2fff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x91be9000 - 0x91bedfff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x91bef000 - 0x91c4efff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libRaw.dylib
0x91c53000 - 0x91c90fff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x91c97000 - 0x91cb0fff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libPng.dylib
0x91cb5000 - 0x91cb8fff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x91cba000 - 0x91cbafff com.apple.Accelerate 1.2.2 (Accelerate 1.2.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x91cbc000 - 0x91da1fff com.apple.vImage 2.4 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.fr amework/Versions/A/vImage
0x91da9000 - 0x91dc8fff com.apple.Accelerate.vecLib 3.2.2 (vecLib 3.2.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/vecLib
0x91e34000 - 0x91ea2fff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvMisc.dylib
0x91ead000 - 0x91f42fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libvDSP.dylib
0x91f5c000 - 0x924e4fff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libBLAS.dylib
0x92517000 - 0x92842fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.fr amework/Versions/A/libLAPACK.dylib
0x92872000 - 0x928fafff com.apple.DesktopServices 1.3.4 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Desk topServicesPriv
0x9293b000 - 0x92b66fff com.apple.Foundation 6.4.6 (567.27) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x92c84000 - 0x92d62fff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x92d82000 - 0x92e70fff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x92e82000 - 0x92ea0fff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x92eab000 - 0x92f05fff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x92f23000 - 0x92f23fff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x92f25000 - 0x92f39fff com.apple.ImageCapture 3.0 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture. framework/Versions/A/ImageCapture
0x92f51000 - 0x92f61fff com.apple.speech.recognition.framework 3.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecogni tion.framework/Versions/A/SpeechRecognition
0x92f6d000 - 0x92f82fff com.apple.securityhi 2.0 (203) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.fr amework/Versions/A/SecurityHI
0x92f94000 - 0x9301bfff com.apple.ink.framework 101.2 (69) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework /Versions/A/Ink
0x9302f000 - 0x9303afff com.apple.help 1.0.3 (32) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framewor k/Versions/A/Help
0x93044000 - 0x93071fff com.apple.openscripting 1.2.5 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting .framework/Versions/A/OpenScripting
0x9308b000 - 0x9309bfff com.apple.print.framework.Print 5.0 (190.1) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framewo rk/Versions/A/Print
0x930a7000 - 0x9310dfff com.apple.htmlrendering 1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering .framework/Versions/A/HTMLRendering
0x9313e000 - 0x9318dfff com.apple.NavigationServices 3.4.4 (3.4.3) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationSer vices.framework/Versions/A/NavigationServices
0x931bb000 - 0x931d8fff com.apple.audio.SoundManager 3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.f ramework/Versions/A/CarbonSound
0x931ea000 - 0x931f7fff com.apple.CommonPanels 1.2.2 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels. framework/Versions/A/CommonPanels
0x93200000 - 0x9350dfff com.apple.HIToolbox 1.4.8 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.fra mework/Versions/A/HIToolbox
0x9365c000 - 0x93668fff com.apple.opengl 1.4.7 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x9366d000 - 0x9368dfff com.apple.DirectoryService.Framework 3.1 /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryServi ce
0x936e0000 - 0x936e0fff com.apple.Cocoa 6.4 (???) /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x936e2000 - 0x93d15fff com.apple.AppKit 6.4.7 (824.41) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x940a2000 - 0x94112fff com.apple.CoreData 80 /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
0x9414b000 - 0x9420efff com.apple.audio.toolbox.AudioToolbox 1.4.3 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x94260000 - 0x94260fff com.apple.audio.units.AudioUnit 1.4 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x94262000 - 0x94435fff com.apple.QuartzCore 1.4.9 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x9448b000 - 0x944c8fff libsqlite3.0.dylib /usr/lib/libsqlite3.0.dylib
0x944d0000 - 0x94520fff libGLImage.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dyl ib
0x945b1000 - 0x945e9fff com.apple.vmutils 4.0.0 (85) /System/Library/PrivateFrameworks/vmutils.framework/Versions/A/vmutils
0x9462c000 - 0x94648fff com.apple.securityfoundation 2.2 (27710) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoun dation
0x9465c000 - 0x946a0fff com.apple.securityinterface 2.2 (27692) /System/Library/Frameworks/SecurityInterface.framework/Versions/A/SecurityInter face
0x946c4000 - 0x946d3fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x946db000 - 0x946e7fff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x9472d000 - 0x94745fff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x9474c000 - 0x94a1bfff com.apple.QuickTime 7.1.3 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x94ade000 - 0x94b4ffff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib
0x94bc2000 - 0x94be2fff libmx.A.dylib /usr/lib/libmx.A.dylib
0x94cea000 - 0x94e1afff com.apple.AddressBook.framework 4.0.4 (485.1) /System/Library/Frameworks/AddressBook.framework/Versions/A/AddressBook
0x94eac000 - 0x94ebbfff com.apple.DSObjCWrappers.Framework 1.1 /System/Library/PrivateFrameworks/DSObjCWrappers.framework/Versions/A/DSObjCWra ppers
0x94ec3000 - 0x94ef0fff com.apple.LDAPFramework 1.4.1 (69.0.1) /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
0x94ef7000 - 0x94f07fff libsasl2.2.dylib /usr/lib/libsasl2.2.dylib
0x94f0b000 - 0x94f3afff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
0x94f4a000 - 0x94f67fff libresolv.9.dylib /usr/lib/libresolv.9.dylib
0x95687000 - 0x95715fff com.apple.WebKit 418.9 /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
0x95771000 - 0x95807fff com.apple.JavaScriptCore 418.3 /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCor e.framework/Versions/A/JavaScriptCore
0x95844000 - 0x95b50fff com.apple.WebCore 418.21 /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
0x95cd9000 - 0x95d02fff libxslt.1.dylib /usr/lib/libxslt.1.dylib
0x95e90000 - 0x95ecffff com.apple.QTKit 7.1.3 /System/Library/Frameworks/QTKit.framework/Versions/A/QTKit
0x96ef9000 - 0x96f18fff com.apple.vecLib 3.2.2 (vecLib 3.2.2) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x9762f000 - 0x976f0fff libGLProgrammability.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgramma bility.dylib
0x9771b000 - 0x9771cfff libGLSystem.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLSystem.dy lib
0x9771e000 - 0x9772bfff com.apple.agl 2.5.6 (AGL-2.5.6) /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x98b44000 - 0x994fbfff com.apple.QuickTimeComponents.component 7.1.3 /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTim eComponents
0x99722000 - 0x99726fff com.apple.QuickTimeH264.component 7.1.3 /System/Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264
0x99728000 - 0x9980cfff QuickTimeH264.altivec /System/Library/QuickTime/QuickTimeH264.component/Contents/Resources/QuickTimeH 264.altivec
0x998f3000 - 0x9994bfff com.apple.QuickTimeMPEG.component 7.1.3 /System/Library/QuickTime/QuickTimeMPEG.component/Contents/MacOS/QuickTimeMPEG
0x99958000 - 0x99a1ffff com.apple.QuickTimeMPEG4.component 7.1.3 /System/Library/QuickTime/QuickTimeMPEG4.component/Contents/MacOS/QuickTimeMPEG 4
0x99a3c000 - 0x99ba0fff com.apple.QuickTimeStreaming.component 7.1.3 /System/Library/QuickTime/QuickTimeStreaming.component/Contents/MacOS/QuickTime Streaming
0x9a192000 - 0x9a1bdfff com.apple.QuickTime Plugin.plugin 7.1.3 /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin
0x9a4d8000 - 0x9a50efff com.apple.Syndication 1.0.6 (54) /System/Library/PrivateFrameworks/Syndication.framework/Versions/A/Syndication
0x9a52b000 - 0x9a53dfff com.apple.SyndicationUI 1.0.6 (54) /System/Library/PrivateFrameworks/SyndicationUI.framework/Versions/A/Syndicatio nUI
Model: PowerBook5,6, BootROM 4.9.1f1, 1 processors, PowerPC G4 (1.2), 1.67 GHz, 1 GB
Graphics: ATI Mobility Radeon 9700, ATY,RV360M11, AGP, 64 MB
Memory Module: SODIMM0/J25LOWER, 512 MB, DDR SDRAM, PC2700U-25330
Memory Module: SODIMM1/J25UPPER, 512 MB, DDR SDRAM, PC2700U-25330
AirPort: AirPort Extreme, 405.1 (3.90.34.0.p18)
Modem: Jump, , V.92, Version 1.0,
Bluetooth: Version 1.7.8f2, 2 service, 1 devices, 1 incoming serial ports
Network Service: AirPort, AirPort, en1
PCI Card: TXN,PCIXXXX-00, cardbus, PC Card
Parallel ATA Device: MATSHITADVD-R UJ-835E,
Parallel ATA Device: FUJITSU MHT2080AH, 74.53 GB
USB Device: Bluetooth HCI, , Up to 12 Mb/sec, 500 mA
USB Device: Apple Internal Keyboard/Trackpad, Apple Computer, Up to 12 Mb/sec, 500 mAI downloaded and reapplyed the 10.4.8 update. Upon the restart, the blue screen with the Apple logo in the center came up, and that is it. I have tried all the methods of restarting as stated in the manual, but none have done anything. I ran the hardware test, it finished and said everything was OK. Now, the little spinning wheel is going round and round, AND there is a "NO" sign where the Apple shoud be (NO sign is a circle with a line diagonally through it). A thousand helper points to anyone that can help me get this thing going again.
PowerBook G4 Mac OS X (10.4.6)
arnie
Posts: 632
Registered: Dec 5, 2002
Re: Frozen, can't get anything but a blue screen on restart
Posted: Nov 22, 2006 12:11 PM in response to: MacDouglas Reply Email
if it won't boot even in "safe mode" - shift key held down right after restart, OS is probably messed up badly.
you could try booting from 10.4 disc and running "archive and install"
MacDouglas
Posts: 9
From: Texas
Registered: Apr 22, 2006
Re: Frozen, can't get anything but a blue screen on restart
Posted: Nov 22, 2006 2:00 PM in response to: arnie Reply Email
I did try to boot using the disc. However, when I select the disk in the Startup Manager (and the HD, startup disc and hardware test) all show up as options, I hi-light the disc, click the arrow, then go into infinite wait mode, first with the apple and spinning gear, later (on a couple of occasions) the apple turns into the prohibitory sign.
Boy, I am lost on this.....I couldn't even reload everything with this situation.
PowerBook G4 Mac OS X (10.4.6)
arnie
Posts: 632
Registered: Dec 5, 2002
Re: Frozen, can't get anything but a blue screen on restart
Posted: Nov 22, 2006 4:36 PM in response to: MacDouglas Reply Email
to boot from OS disc try holding down "c" on keyboard, do not hold "option" key
if it won't boot from original OS disc when "c" is pressed, could be some hardware issue
MacDouglas
Posts: 9
From: Texas
Registered: Apr 22, 2006
Re: Frozen, can't get anything but a blue screen on restart
Posted: Nov 23, 2006 5:52 AM in response to: arnie Reply Email
I couldn´t get anything done, however I read through some other posts and tried the command-option-P-R. This, after the second restart, allowed me to finally access the disk utilities. I did a "first aid repair", got a lot of library issues repaired by was left with a final message that said:
Invalid leaf record count
should be 12 instead of 730
AT the bottom, the final summary said:
1 HFS volume repaired
1 Volume could not be repaired
I tried again several other times to restart, however still no can do.
Ideas?
PowerBook G4 Mac OS X (10.4.6) -
Hi All,
I've got a client that's running into an intermittent crashing problem with InDesign. Ordinarily "intermittent" points to hardware, but we wanted to rule out bad software first, especially as InDesign is the ONLY application that's crashing on this system. The crashing doesn't seem to correspond to any given task that's executed within InDesign either. This is an iMac 2.5 GHz Intel Core i5 (mid 2011 model), 8 GB of RAM. Original this iMac was running Snow Leopard with InDesign CS5 (7.0.4), and crashing fequently then. For numerous reasons including the crashing we did an erase and install of the OS, this time installing 10.8.2, and a fresh install of CS5 and ran all updates from Adobe (to 7.0.4), and then ran a Disk Permissions repair (we have not updated to 10.8.3 due to reports I've seen of more crashing with InDesign CS5). Fonts and InDesign application support files from ~/Library were migrated over manually, but no other user data. The crashing occurs within two user accounts on this fresh OS (one of which was created to troubleshoot with as a clean environment) so isn't likely user account related but due to fonts that may not be confirmed. Being that it's intermittent it's been quite hard to track down. Linotype Font Explorer is installed on this system and I have just now disabled the font activation plugins in case that is part of the problem here; haven't had a chance yet to let the system run without those to see if the problem is resolved. Two recent crash logs (below) show different activity causing the crash (I've included thread 0 only, but can post more if requested; my experience has been that thread 0 will usually give you what you need, but given that we're seeing different cuases here I'm at a loss). We have tried fresh RAM in the system in case this was related to bad memory, and that made no difference. Font caches for both applications and the OS have been cleared and fonts showing any missing printer font files have been disabled. Any help would be greatly apprecaited.
Many thanks,
Mike
Log 1:
Process: Adobe InDesign CS5 [11565]
Path: /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
Identifier: com.adobe.InDesign
Version: 7.0.4.553 (7040)
Code Type: X86 (Native)
Parent Process: launchd [238]
User ID: 501
Date/Time: 2013-05-02 12:45:38.327 -0700
OS Version: Mac OS X 10.8.2 (12C60)
Report Version: 10
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004
VM Regions Near 0x4:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
__TEXT 0000000000001000-0000000000005000 [ 16K] r-x/rwx SM=COW /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.adobe.InDesign.Links 0x11da9cfd 0x11d39000 + 462077
1 com.adobe.InDesign.Links 0x11dad857 0x11d39000 + 477271
2 com.adobe.InDesign.Links 0x11dabcc0 0x11d39000 + 470208
3 com.adobe.InDesign.Links 0x11da96b9 0x11d39000 + 460473
4 DataBaseLib.dylib 0x010fd89f InterfaceSnapshot::ResetObjectToSnapshot(IDataBase*, IPMUnknown*, IDType<SnapshotID_tag>, ISnapshotCache*, scoped_lastrevinfodataref&) + 575
5 ObjectModelLib.dylib 0x01063b80 0x1038000 + 179072
6 ObjectModelLib.dylib 0x01070eb8 ShuksanInit(IStartupScreen* (*)(), IPlugIn*) + 23784
7 DataBaseLib.dylib 0x010ce158 0x10c9000 + 20824
8 com.adobe.InDesign.Links 0x11d7b093 0x11d39000 + 270483
9 com.adobe.InDesign.Links 0x11d7d991 0x11d39000 + 280977
10 com.adobe.InDesign.Links 0x11d8ee5a 0x11d39000 + 351834
11 com.adobe.InDesign.Links 0x11d9f17f 0x11d39000 + 418175
12 com.adobe.InDesign.Links 0x11da016e 0x11d39000 + 422254
13 com.adobe.InDesign.Links 0x11d78258 0x11d39000 + 258648
14 com.adobe.InDesign.Links 0x11e05bbc GetPlugIn + 191420
15 com.adobe.InDesign.Links 0x11e05836 GetPlugIn + 190518
16 com.adobe.InDesign.Document Framework 0x0d937a85 0xd936000 + 6789
17 com.adobe.InDesign.Document Framework 0x0d937b75 0xd936000 + 7029
18 com.adobe.InDesign.AppFramework 0x0bbb60ed GetPlugIn + 201661
19 com.adobe.InDesign.Links 0x11d71025 0x11d39000 + 229413
20 com.adobe.InDesign.Links 0x11d70d6c 0x11d39000 + 228716
21 ObjectModelLib.dylib 0x01062640 0x1038000 + 173632
22 ObjectModelLib.dylib 0x010651bb 0x1038000 + 184763
23 com.adobe.InDesign.Document Framework 0x0d9d0ed0 0xd936000 + 634576
24 com.adobe.InDesign.Links 0x11dc53f8 0x11d39000 + 574456
25 com.adobe.InDesign.Document Framework 0x0d937a85 0xd936000 + 6789
26 com.adobe.InDesign.Document Framework 0x0d937b75 0xd936000 + 7029
27 com.adobe.InDesign.AppFramework 0x0bbb60ed GetPlugIn + 201661
28 PublicLib.dylib 0x01161d6c UIDList::ReadWrite(IPMStream*, UIDList::EXferType) + 204
29 PublicLib.dylib 0x01161f50 UIDList::ReadWriteXferReference(IPMStream*) + 32
30 com.adobe.InDesign.Links 0x11db2d49 0x11d39000 + 499017
31 ObjectModelLib.dylib 0x01062640 0x1038000 + 173632
32 ObjectModelLib.dylib 0x01065ab5 0x1038000 + 187061
33 com.adobe.InDesign.Document Framework 0x0d9d13ec 0xd936000 + 635884
34 com.adobe.InDesign.Document Framework 0x0d9d0c1e 0xd936000 + 633886
35 com.adobe.InDesign.Generic Page Item 0x117a0a86 GetPlugIn + 149142
36 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
37 com.adobe.InDesign.Utilities 0x0ce10aa3 0xce0f000 + 6819
38 com.adobe.InDesign.Utilities 0x0ce10ccc 0xce0f000 + 7372
39 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
40 PublicLib.dylib 0x0116557b CmdUtils::ProcessCommand(ICommand*) + 59
41 com.adobe.InDesign.Document Framework 0x0d952c6d 0xd936000 + 117869
42 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
43 com.adobe.InDesign.Utilities 0x0ce10aa3 0xce0f000 + 6819
44 com.adobe.InDesign.Utilities 0x0ce10ccc 0xce0f000 + 7372
45 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
46 PublicLib.dylib 0x0116557b CmdUtils::ProcessCommand(ICommand*) + 59
47 PublicLib.dylib 0x01163cd1 CompoundSequenceCmd::Do() + 369
48 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
49 com.adobe.InDesign.Utilities 0x0ce10aa3 0xce0f000 + 6819
50 com.adobe.InDesign.Utilities 0x0ce10ccc 0xce0f000 + 7372
51 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
52 PublicLib.dylib 0x0116557b CmdUtils::ProcessCommand(ICommand*) + 59
53 com.adobe.InDesign.AppFramework 0x0bb83bef 0xbb60000 + 146415
54 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
55 com.adobe.InDesign.Utilities 0x0ce10aa3 0xce0f000 + 6819
56 com.adobe.InDesign.Utilities 0x0ce10ccc 0xce0f000 + 7372
57 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
58 PublicLib.dylib 0x0116557b CmdUtils::ProcessCommand(ICommand*) + 59
59 com.adobe.InDesign.AppFramework 0x0bb83bef 0xbb60000 + 146415
60 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
61 com.adobe.InDesign.Utilities 0x0ce10aa3 0xce0f000 + 6819
62 com.adobe.InDesign.Utilities 0x0ce10ccc 0xce0f000 + 7372
63 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
64 PublicLib.dylib 0x0116557b CmdUtils::ProcessCommand(ICommand*) + 59
65 com.adobe.InDesign.Widgets 0x0e99304b GetPlugIn + 211323
66 com.adobe.InDesign.Widgets 0x0e996386 GetPlugIn + 224438
67 com.adobe.InDesign.Widgets 0x0e995fc0 GetPlugIn + 223472
68 PublicLib.dylib 0x0117982b CScrapSuite_Extensible::Paste(IClipboardController*, IControlView*, short) + 219
69 com.adobe.InDesign.Application UI 0x0d3d1ff4 0xd3af000 + 143348
70 com.adobe.InDesign.Application UI 0x0d3d2f05 0xd3af000 + 147205
71 com.adobe.InDesign.Application UI 0x0d3d0abc 0xd3af000 + 137916
72 com.adobe.InDesign.Application UI 0x0d433632 GetPlugIn + 217730
73 com.adobe.InDesign.Actions 0x13d30de3 GetPlugIn + 11699
74 com.adobe.InDesign.Actions 0x13d1eccc 0x13d1d000 + 7372
75 WidgetBinLib.dylib 0x02880334 MDefaultEH::KeyboardShortcut(IEvent*) + 484
76 WidgetBinLib.dylib 0x0287fb34 CDefaultEH::KeyDown(IEvent*) + 148
77 WidgetBinLib.dylib 0x02880133 MDefaultEH::KeyDown(IEvent*) + 163
78 PublicLib.dylib 0x01184bee CEventDispatcher::DispatchToEventHandlers(IEvent*) + 222
79 PublicLib.dylib 0x011846a8 CEventDispatcher::DispatchEvent(IEvent*, IEvent::SystemHandledState) + 24
80 com.adobe.InDesign.Application UI 0x0d446b99 GetPlugIn + 296937
81 com.adobe.InDesign.Application UI 0x0d4445dc GetPlugIn + 287276
82 com.apple.HIToolbox 0x9995cb6b _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
83 com.apple.HIToolbox 0x997e4594 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1343
84 com.apple.HIToolbox 0x997e3980 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 430
85 com.apple.HIToolbox 0x997f7855 SendEventToEventTarget + 88
86 com.apple.HIToolbox 0x998178b2 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 2392
87 com.apple.HIToolbox 0x997e4a3f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2538
88 com.apple.HIToolbox 0x997e3980 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 430
89 com.apple.HIToolbox 0x997f7855 SendEventToEventTarget + 88
90 com.apple.HIToolbox 0x997d9077 SendTSMEvent + 75
91 com.apple.HIToolbox 0x997d8b0b SendUnicodeTextAEToUnicodeDoc + 745
92 com.apple.HIToolbox 0x997d8704 TSMKeyEvent + 980
93 com.apple.HIToolbox 0x998281e5 TSMProcessRawKeyEvent + 3102
94 com.apple.HIToolbox 0x99868ec5 HandleCompatibilityKeyEvent + 323
95 com.apple.HIToolbox 0x997e0aba HIApplication::EventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 7318
96 com.apple.HIToolbox 0x9995cb6b _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
97 com.apple.HIToolbox 0x997e4594 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1343
98 com.apple.HIToolbox 0x997e3980 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 430
99 com.apple.HIToolbox 0x997e37ca SendEventToEventTargetWithOptions + 94
100 com.apple.HIToolbox 0x9981738c ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1074
101 com.apple.HIToolbox 0x997e4a3f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2538
102 com.apple.HIToolbox 0x997e3980 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 430
103 com.apple.HIToolbox 0x997f7855 SendEventToEventTarget + 88
104 com.adobe.InDesign.AppFramework 0x0bb62fd5 0xbb60000 + 12245
105 com.adobe.InDesign.AppFramework 0x0bb884fa GetPlugIn + 14282
106 com.adobe.InDesign 0x0000288b main + 187
107 com.adobe.InDesign 0x000027a6 start + 54
Log 2:
Process: Adobe InDesign CS5 [745]
Path: /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
Identifier: com.adobe.InDesign
Version: 7.0.4.553 (7040)
Code Type: X86 (Native)
Parent Process: launchd [142]
User ID: 501
Date/Time: 2013-05-07 15:00:42.593 -0700
OS Version: Mac OS X 10.8.2 (12C60)
Report Version: 10
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
VM Regions Near 0:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
__TEXT 0000000000001000-0000000000005000 [ 16K] r-x/rwx SM=COW /Applications/Adobe InDesign CS5/Adobe InDesign CS5.app/Contents/MacOS/Adobe InDesign CS5
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.adobe.InDesign.Text 0x0ff26f59 GetPlugIn + 1072585
1 com.adobe.InDesign.Text 0x0ff2c0eb GetPlugIn + 1093467
2 com.adobe.InDesign.Text 0x0ff2c1ef GetPlugIn + 1093727
3 com.adobe.InDesign.Text 0x0ff2c2c7 GetPlugIn + 1093943
4 DataBaseLib.dylib 0x010fd89f InterfaceSnapshot::ResetObjectToSnapshot(IDataBase*, IPMUnknown*, IDType<SnapshotID_tag>, ISnapshotCache*, scoped_lastrevinfodataref&) + 575
5 ObjectModelLib.dylib 0x01063b80 0x1038000 + 179072
6 ObjectModelLib.dylib 0x01070eb8 ShuksanInit(IStartupScreen* (*)(), IPlugIn*) + 23784
7 DataBaseLib.dylib 0x010ce158 0x10c9000 + 20824
8 com.adobe.InDesign.Text 0x0ff2e909 GetPlugIn + 1103737
9 com.adobe.InDesign.Text 0x1004932e GetPlugIn + 2261406
10 com.adobe.InDesign.Text 0x0fe3fcba GetPlugIn + 125738
11 com.adobe.InDesign.Text 0x0fe400ff GetPlugIn + 126831
12 com.adobe.InDesign.Text 0x0fec3876 GetPlugIn + 665318
13 PublicLib.dylib 0x01164422 Command::DoImmediate(short) + 34
14 com.adobe.InDesign.Utilities 0x0ce3baa3 0xce3a000 + 6819
15 com.adobe.InDesign.Utilities 0x0ce3bccc 0xce3a000 + 7372
16 com.adobe.InDesign.AppFramework 0x0bb7a688 0xbb60000 + 108168
17 com.adobe.InDesign.AppFramework 0x0bb6cf11 0xbb60000 + 53009
18 com.adobe.InDesign.AppFramework 0x0bb62f0e 0xbb60000 + 12046
19 com.adobe.InDesign.AppFramework 0x0bb884fa GetPlugIn + 14282
20 com.adobe.InDesign 0x0000288b main + 187
21 com.adobe.InDesign 0x000027a6 start + 54Thanks, Peter.
The "link related" and "text related" crashes were what I interpretted here, too, though I'm at a loss on how to proceed given that this is a fresh system and applications. This is happening with multiple InDesign projects in a design office environment where many others work on the same files and none of the other computers are having problems with these files. I've removed the same files listed (thank you for those) before and did so effectively with creating the new user account to test with, but it had no effect. I just tried again though, as these files could easily have becone corrupt again if they were being written to when InDesign crashed. Will let you know if that makes any difference. I've also gone through and completely cleaned out the fonts again and once more cleared the font caches. If need be I'll reboot this system into safe mode and try that way.
Best,
Mike -
I'm new and I REALLY need help
Hi, my name is Chris, I'm new to java.sun.com and I'm a beginner programmer seeking a degree in Comp Sci. I've been writing some code and I've stumbled on some problems that I can't troubleshoot, (run-time?) error seems to be way over my head, the program should work, i don't know why not? Can someone please please give me a clue as to what's going on?
Here's the program;
I have to greate a Coins class that will define the different coins (dime, nickelsk, etc.) that will be used in the main .java file. The main .java file has to randomly generate some "change" and sort it out in the least amount of coins possible.
The problem:
There are no compilation errors; however, when I run the program I receive this run-time error:
Exception occurred during event dispatching:
java.lang.NullPointerException
at cs130project3.Project3.paint(Project3.java:48)
at sun.awt.RepaintArea.paint(RepaintArea.java:298)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:196)
at java.awt.Component.dispatchEventImpl(Component.java:2663)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
What does this mean?
Some things I've tried are sticking a g.drawOval() into the paint method, it works just fine, so i assumed there must a problem passing the g object into the coins.draw(g) method, is there a file placement problem or an object passing problem? I'm using Borland JBuilder 7 and i'm assuming that it places the files in the right location, its all in a package called cs130Project3.
Here is the code:
Coins class:
import java.awt.*;
public class Coins {
private final int DIAMETER = 30;
private int coinsAmount = 0;
private String coinsType = "";
private int coinsPosX = 0;
private int coinsPosY = 0;
public Coins(int coinAmount, String coinType, int coinPosX, int coinPosY) {
coinsAmount = coinAmount;
coinsType = coinType;
coinsPosX = coinPosX;
coinsPosY = coinPosY;
public void draw(Graphics screen){
for(int i = 0; i < coinsAmount; i++)
screen.drawOval(coinsPosX,coinsPosY,DIAMETER,DIAMETER);
coinsPosX += 5;
coinsPosY += 5;
if(i == (coinsAmount - 1))
screen.drawString(coinsType,(coinsPosX+10),(coinsPosY+10));
Here is the main class:
import java.awt.*;
import java.util.Random;
import java.applet.Applet;
public class Project3 extends Applet {
private Coins Pennies, Nickels, Dimes, Quarters;
public void init() {
int randomChange = 0;
int numPenny = 0, numNickel = 0, numDime = 0, numQuarter = 0;
String Penny = "1c", Nickel = "5c", Dime = "10c", Quarter = "25c";
Random generator = new Random();
randomChange = generator.nextInt(100);
while(randomChange > 0)
while(randomChange >=1)
while(randomChange >= 5)
while(randomChange >= 10)
while(randomChange >= 25)
numQuarter++;
randomChange -= 25;
if(randomChange >= 10)
numDime++;
randomChange -= 10;
if(randomChange >= 5)
numNickel++;
randomChange -= 5;
if(randomChange >= 1)
numPenny++;
randomChange -= 1;
} // End while loop
Coins Pennies = new Coins(numPenny,Penny,10,10);
Coins Nickels = new Coins(numNickel,Nickel,100,10);
Coins Dimes = new Coins(numDime,Dime,150,10);
Coins Quarters = new Coins(numQuarter,Quarter,200, 10);
public void paint (Graphics g)
Pennies.draw(g);
Nickels.draw(g);
Dimes.draw(g);
Quarters.draw(g);
help me!!
Thank you,
ChrisChris, I can't even compile your stuff because you didn't post all your classes (Coin is missing), but the runtime error is telling you a lot:
java.lang.NullPointerException
at cs130project3.Project3.paint(Project3.java:48)It says you're dereferencing an object that's null at line 48 of your Project3 class. Turn on line numbering in your text editor, go to line 48, and see what you've missed. One of your objects wasn't initialized. I'll bet you declared a reference type in a class but never initialized it properly in a constructor. The JVM will set those references to null unless you provide a value. - MOD -
Hello everyone. Some help would be appreciated. I have created a wildlife resort database with access.
It has an animals table with 5 entries, a species table with 3 entries and a user table with 3 entries.
I have set up a JDBC-ODBC bridge.
The server side of this application when run gets stuck upon pressing connect the first time so I have to run the server again while the first server window is running in the background and press connect for it to start running. The server works just fine after that. I can add and remove from the tables using the server.
When I run the client and try to connect it, it doesn't accept the hostname. I can't connect or log in.
I think the problem is with the threads but I'm not sure what to do to fix it.
Also I use java beans for coding.
These are some errors I get when running the client:
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.add(ThreadGroup.java:856)
at java.lang.Thread.start(Thread.java:573)
at org.apache.tools.ant.taskdefs.ProcessDestroyer.removeShutdownHook(ProcessDestroyer.java:145)
at org.apache.tools.ant.taskdefs.ProcessDestroyer.remove(ProcessDestroyer.java:198)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:487)
at org.apache.tools.ant.taskdefs.Java.fork(Java.java:746)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:170)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:64)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:377)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:217)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
Exception in thread "Thread-7" java.lang.NullPointerException
at Client.Connect.connecting(Connect.java:45)
at Client.ClientGUI.run(ClientGUI.java:214)
at java.lang.Thread.run(Thread.java:595)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at Client.Connect.userPass(Connect.java:206)
at Client.ClientGUI.actionPerformed(ClientGUI.java:164)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
at java.awt.Component.processMouseEvent(Component.java:5488)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
at java.awt.Component.processEvent(Component.java:5253)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1766)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
These are the classes I have created:
On the client side:
//imports needed for the GUI and I/O Operations
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
import java.io.*;
public class ClientGUI extends JFrame implements ActionListener, Runnable {
JPanel pane = new JPanel();
//Create the Menubar Items
JMenuBar bar = new JMenuBar();
JMenu jMenu1 = new JMenu();
JMenu jMenu2 = new JMenu();
JMenu jMenu3 = new JMenu();
JMenuItem Exit = new JMenuItem();
JMenuItem Open = new JMenuItem();
JMenuItem Close = new JMenuItem();
JMenuItem Find = new JMenuItem();
static JMenuItem Add = new JMenuItem();
static JMenuItem Remove = new JMenuItem();
static JMenuItem Connect1 = new JMenuItem();
static JMenuItem Disconnect = new JMenuItem();
static JMenuItem Login = new JMenuItem();
static JMenuItem Logout = new JMenuItem();
static boolean check = true;
static JLabel running = new JLabel("You are not Connected");
//Creates the animal JTable and adds it to a scrollpane
public static String[] animalH = {"Id" , "Name" , "Description" , "Species Id"};
public static Object rows1 [] [] = new Object[40][4];
public static JTable animal = new JTable(rows1 , animalH);
JScrollPane animalP;
//Creates the species JTable and adds it to a scrollpane
public static String[] speciesH = {"Species Id" , "Species Name"};
public static Object rows2 [] [] = new Object[40][2];
public static JTable species = new JTable(rows2 , speciesH);
JScrollPane speciesP;
public static Thread runner;
//Declares Globale variables
static int currentT;
int respones;
static String hostname;
static boolean connected = false;
/** Creates a new instance of ClientGUI */
public ClientGUI() {
super("SA Wildlife -- Client");
setSize(800 , 600);
setDefaultCloseOperation(EXIT_ON_CLOSE);
getContentPane().add(running , BorderLayout.SOUTH);
Add.setEnabled(false);
Remove.setEnabled(false);
Logout.setEnabled(false);
Disconnect.setEnabled(false);
try {
jbInit();
}catch(Exception e) {
e.printStackTrace();
addListener();
setJMenuBar(bar);
setVisible(true);
//Add the actionListeners to the components
public void addListener(){
Open.addActionListener(this);
Close.addActionListener(this);
Exit.addActionListener(this);
Connect1.addActionListener(this);
Disconnect.addActionListener(this);
Find.addActionListener(this);
Login.addActionListener(this);
Logout.addActionListener(this);
Add.addActionListener(this);
Remove.addActionListener(this);
//Add the actions which the components must perform
public void actionPerformed(ActionEvent evt){
Object s = evt.getSource();
if (s == Open){
choice();
Close();
if (respones == 0){
currentT = 1;
clearTableAnimals();
Connect.allAnimal();
animal = new JTable(rows1, animalH);
animalP = new JScrollPane(animal);
getContentPane().add(animalP, BorderLayout.CENTER);
setVisible(true);
}else if (respones == 1 ){
currentT = 2;
clearTableSpecies();
Connect.allSpecies();
species = new JTable(rows2 , speciesH);
speciesP = new JScrollPane(species);
getContentPane().add(speciesP, BorderLayout.CENTER);
setVisible(true);
}else if (s == Close){
Close();
}else if (s == Exit){
exit();
}else if (s == Connect1){
hostname = JOptionPane.showInputDialog(null , "Please enter Hostname");
if (check = true){
runner = new Thread(this);
runner.start();
Connect1.setEnabled(false);
Disconnect.setEnabled(true);
}else if (s == Disconnect){
Connect.out.println("Bye");
runner = null;
try {
Connect.out.close();
Connect.in.close();
Connect.clientSocket.close();
} catch (IOException ioe) {
JOptionPane.showMessageDialog(null,
"Error " + ioe.toString(),
"IO Exception",
JOptionPane.ERROR_MESSAGE);
System.exit(0);
}else if (s == Find){
choice();
Close();
if (respones == 0){
currentT = 1;
String Aname = JOptionPane.showInputDialog(null , "Enter Animal name to find ");
clearTableAnimals();
Connect.findAnimal(Aname);
animal = new JTable(rows1, animalH);
animalP = new JScrollPane(animal);
getContentPane().add(animalP, BorderLayout.CENTER);
setVisible(true);
}else{
currentT = 2;
String Sname = JOptionPane.showInputDialog(null , "Enter Species name to find ");
clearTableSpecies();
Connect.findSpecies(Sname);
species = new JTable(rows2 , speciesH);
speciesP = new JScrollPane(species);
getContentPane().add(speciesP, BorderLayout.CENTER);
setVisible(true);
}else if( s== Login){
String name = JOptionPane.showInputDialog(null , "Please enter a UserName");
String password = JOptionPane.showInputDialog(null , "Please enter a Password");
Connect.userPass(name , password);
}else if (s == Logout){
Logout();
}else if (s== Add){
choice();
Close();
if(respones == 0){
currentT = 1;
String id = JOptionPane.showInputDialog(null , "Enter an Animal id");
String name = JOptionPane.showInputDialog(null , "Enter an Animal Name");
String desc = JOptionPane.showInputDialog(null , "Enter an Animal Description");
String speciesid = JOptionPane.showInputDialog(null , "Enter an Animal species id");
clearTableAnimals();
Connect.toAddAnimal(id , name , desc , speciesid);
Connect.allAnimal();
animal = new JTable(rows1, animalH);
animalP = new JScrollPane(animal);
getContentPane().add(animalP, BorderLayout.CENTER);
setVisible(true);
}else{
currentT = 2;
String id = JOptionPane.showInputDialog(null , "Enter a Species id");
String name = JOptionPane.showInputDialog(null , "Enter a Species name");
clearTableSpecies();
Connect.toAddSpecies(id , name);
Connect.allSpecies();
species = new JTable(rows2 , speciesH);
speciesP = new JScrollPane(species);
getContentPane().add(speciesP, BorderLayout.CENTER);
setVisible(true);
}else if (s == Remove){
choice();
Close();
if(respones == 0){
currentT = 1;
String id = JOptionPane.showInputDialog(null , "Enter an Animal id to Remove");
Connect.toRemoveAnimal(id);
}else{
currentT = 2;
String id = JOptionPane.showInputDialog(null , "Enter a Species id to Remove");
Connect.toRemoveSpecies(id);
public void run() {
Connect connect = new Connect();
while (runner != null) {
try {
connect.connecting();
catch (IOException ioe) {
System.out.println("Error: " + ioe);
ClientGUI.running.setText("You are now connected");
//Method the creates the dialog box for the user to choose what he wants to do
void exit(){
String [] option = { "Exit" , "Minimize" , "Cancel" };
int which = JOptionPane.showOptionDialog(null , "Sure you want to exit"
, "Exiting" , 0 , JOptionPane.WARNING_MESSAGE ,
null , option , option[2] );
if (which == 0){
System.exit(1);
}else if (which == 1){
setState(JFrame.ICONIFIED);
}else{}
//Closes the current table on the panel
public void Close(){
if(currentT == 1){
animalP.setVisible(false);
}else if (currentT == 2){
speciesP.setVisible(false);
}else{}
//Method that give the user a choice on which table to perform actions on
public void choice(){
String[] choices = {"Animals" , "Species"};
respones = JOptionPane.showOptionDialog(null ,
"Please select Table" , "Table" , 0 , JOptionPane.INFORMATION_MESSAGE ,
null , choices , choices[1] );
//Clears the Species table
public void clearTableSpecies(){
for (int i = 0; i < 40; i++){
rows2[0] = "";
rows2[i][1] = "";
//Clears the Animal table
public void clearTableAnimals(){
for (int i = 0; i < 40; i++){
rows1[i][0] = "";
rows1[i][1] = "";
rows1[i][2] = "";
rows1[i][3] = "";
//Method for the Logout button
public void Logout(){
JOptionPane.showMessageDialog(null , "You are now logged out ");
Login.setEnabled(true);
Add.setEnabled(false);
Remove.setEnabled(false);
Logout.setEnabled(false);
//Main Methof
public static void main(String[] args) {
ClientGUI GUI1 = new ClientGUI();
// Adds all components to the panel
private void jbInit() throws Exception {
jMenu1.setText("File");
Exit.setText("Exit");
jMenu2.setText("Table Action");
Open.setText("Open Table");
Add.setText("Add to Table");
Remove.setText("Remove from Table");
Find.setText("Find In table");
Close.setText("Close Current");
jMenu3.setText("Client");
Connect1.setText("Connect");
Disconnect.setText("Disconnect");
Login.setText("Login");
Logout.setText("Logout");
bar.add(jMenu1);
bar.add(jMenu2);
bar.add(jMenu3);
jMenu1.add(Exit);
jMenu2.add(Open);
jMenu2.add(Add);
jMenu2.add(Remove);
jMenu2.add(Find);
jMenu2.add(Close);
jMenu3.add(Connect1);
jMenu3.add(Disconnect);
jMenu3.add(Login);
jMenu3.add(Logout);
package Client;
import java.io.*;
import java.net.*;
import javax.swing.*;
import java.util.*;
public class Connect {
static public Socket clientSocket = null;
static public PrintWriter out = null;
static public BufferedReader in = null;
public void connecting() throws IOException {
try{
clientSocket = new Socket(ClientGUI.hostname , 1234);
out = new PrintWriter(clientSocket.getOutputStream() , true);
in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
}catch (UnknownHostException e){
JOptionPane.showMessageDialog(null , "Dont know about host");
ClientGUI.check = false;
ClientGUI.Connect1.setEnabled(true);
ClientGUI.Disconnect.setEnabled(false);
ClientGUI.runner = null;
}catch(IOException i){
ClientGUI.check = false;
JOptionPane.showMessageDialog(null,"Couldnt get i/O for the connection to 127.0.0.0.1");
ClientGUI.Connect1.setEnabled(true);
ClientGUI.Disconnect.setEnabled(false);
ClientGUI.runner = null;
if (ClientGUI.check = true){
String fromServer;
StringTokenizer token1;
String First;
String Second;
String Third;
while ( (fromServer = in.readLine()) != null) {
System.out.println("From SerVer ---------------> " + fromServer);
token1 = new StringTokenizer(fromServer, "%");
StringTokenizer token2;
StringTokenizer token3;
First = token1.nextToken();
System.out.println("First ------- > " + First);
if (First.equalsIgnoreCase("SelectedAnimal")) {
System.out.println("IT's ON ");
Second = token1.nextToken();
System.out.println("Second ----> " + Second);
int y = 0;
int x = 0;
System.out.println("In the 1while");
token2 = new StringTokenizer(Second, "$");
while (token2.hasMoreTokens()) {
System.out.println("In the 2while");
token3 = new StringTokenizer(token2.nextToken(), "@");
x = 0;
while (token3.hasMoreTokens()) {
ClientGUI.rows1[y][x] = token3.nextToken();
x++;
y++;
else if (First.equalsIgnoreCase("SelectedSpecies")) {
System.out.println("IT's ON BITCH ");
Second = token1.nextToken();
System.out.println("Second ----> " + Second);
int y = 0;
int x = 0;
System.out.println("In die 1while");
token2 = new StringTokenizer(Second, "$");
while (token2.hasMoreTokens()) {
System.out.println("In die 2while");
token3 = new StringTokenizer(token2.nextToken(), "@");
x = 0;
while (token3.hasMoreTokens()) {
ClientGUI.rows2[y][x] = token3.nextToken();
x++;
y++;
else if (First.equalsIgnoreCase("FoundAnimal")) {
Second = token1.nextToken();
if (! (Second.equalsIgnoreCase("NONE"))) {
System.out.println("Second ----> " + Second);
int y = 0;
int x = 0;
System.out.println("In the 1while");
token2 = new StringTokenizer(Second, "$");
while (token2.hasMoreTokens()) {
System.out.println("In the 2while");
token3 = new StringTokenizer(token2.nextToken(), "#@#");
x = 0;
while (token3.hasMoreTokens()) {
ClientGUI.rows1[y][x] = token3.nextToken();
x++;
y++;
else {
JOptionPane.showMessageDialog(null,
"Could not find Animal , Please try again");
else if (First.equalsIgnoreCase("FoundSpecies")) {
Second = token1.nextToken();
if (! (Second.equalsIgnoreCase("NONE"))) {
System.out.println("Second ----> " + Second);
int y = 0;
int x = 0;
System.out.println("In die 1while");
token2 = new StringTokenizer(Second, "$");
while (token2.hasMoreTokens()) {
System.out.println("In die 2while");
token3 = new StringTokenizer(token2.nextToken(), "#@#");
x = 0;
while (token3.hasMoreTokens()) {
ClientGUI.rows2[y][x] = token3.nextToken();
x++;
y++;
else {
JOptionPane.showMessageDialog(null,
"Could not find Species , Please try again");
else if (First.equalsIgnoreCase("FoundUser")) {
System.out.println("From Server --- > " + First);
String login = token1.nextToken();
System.out.println("Find true or false ---- > " + login);
if (login.equalsIgnoreCase("isUser")) {
JOptionPane.showMessageDialog(null, "You are now logged in");
ClientGUI.Add.setEnabled(true);
ClientGUI.Remove.setEnabled(true);
ClientGUI.Logout.setEnabled(true);
ClientGUI.Login.setEnabled(false);
else {
JOptionPane.showMessageDialog(null,
"Invalid Username or Password, Please try again");
else if (First.equalsIgnoreCase("RecordAddedA")) {
JOptionPane.showMessageDialog(null, "Record Added");
else if (First.equalsIgnoreCase("RecordAddedS")) {
JOptionPane.showMessageDialog(null, "Record Added");
else if (First.equalsIgnoreCase("SQLE")) {
System.out.println("ERROR SQL ERROR");
else if (First.equalsIgnoreCase("Blah1")) {
System.out.println("ERROR Ander ERROR");
else if (First.equalsIgnoreCase("AnimalRemoved")) {
JOptionPane.showMessageDialog(null, "Record Removed");
else if (First.equalsIgnoreCase("SpeciesRemoved")) {
JOptionPane.showMessageDialog(null, "Record Removed");
}else{
System.out.println("BLAAAAAAAAH");
static public void Close() throws IOException{
out.println("bye");
ClientGUI.runner = null;
ClientGUI.Disconnect.setEnabled(false);
ClientGUI.Connect1.setEnabled(true);
out.close();
in.close();
clientSocket.close();
static public void allAnimal(){
out.println("SELECTANIMALS");
static public void allSpecies(){
out.println("SELECTSPECIES");
static public void findAnimal(String name){
out.println("FINDANIMAL" + "@" + name);
static public void findSpecies(String name){
out.println("FINDSPECIES@" + name);
static public void userPass(String name , String password){
System.out.println("FINDUSER -----> " + name + " " + password);
out.println("FINDUSER@" + name + "@" + password);
static public void toAddAnimal(String id , String name , String desc , String species){
out.println("toAddAnimal@" + id +"@" + name +"@" + desc +"@" + species );
static public void toAddSpecies(String id , String name){
out.println("toAddSpecies@" + id +"@" + name );
static public void toRemoveAnimal(String id){
out.println("toRemoveAnimal@" + id);
static public void toRemoveSpecies(String id){
out.println("toRemoveSpecies@" + id);
On the server side:
package Server;
////import everything necesary for the Database Connection
import java.sql.*;
import java.util.StringTokenizer;
import javax.swing.*;
import java.util.*;
public class DatabaseConnect {
//Declaration of Globale variables
static int hoeveel = 0;
static ResultSet rec ;
static String bidData[] = new String[100];
static String toSend[] = new String[100];
//Connects the program to the database
public DatabaseConnect() {
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String source = "jdbc:odbc:Database";
Connection dbconnect = DriverManager.getConnection(source);
Statement st = dbconnect.createStatement();
}catch(ClassNotFoundException cnf){
System.out.println("classNotFound" + cnf);
}catch(SQLException se) {
System.out.println("SqlExeption" + se);
//Selects the data from the databas and adds the data to the tables
public void open(){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String source = "jdbc:odbc:Database";
Connection dbconnect = DriverManager.getConnection(source);
Statement st = dbconnect.createStatement();
if (ServerGUI.currentT == 1){
hoeveel = 0;
rec = st.executeQuery("SELECT * FROM ANIMALS");
while (rec.next()) {
bidData[hoeveel++] = rec.getString(1) + "@#@" +
rec.getString(2) + "@#@" +
rec.getString(3) + "@#@" +
rec.getString(4);
readintoTable1();
}else if (ServerGUI.currentT == 2){
hoeveel = 0;
rec = st.executeQuery("SELECT * FROM SPECIES");
while (rec.next()) {
bidData[hoeveel++] = rec.getString(1) + "@#@" + rec.getString(2);
readintoTable2();
}else if(ServerGUI.currentT == 3){
hoeveel = 0;
rec = st.executeQuery("SELECT * FROM USER");
while (rec.next()) {
bidData[hoeveel++] = rec.getString(1) + "@#@" + rec.getString(2)
+ "@#@" + rec.getString(3);
readintoTable3();
}catch(ClassNotFoundException cnf){
System.out.println("classNotFound" + cnf);
}catch(SQLException se) {
System.out.println("SqlExeption" + se);
//Clean the table and reads the data into the animal table
public void readintoTable1(){
for(int a = 0; a < 40; a++){
ServerGUI.rows1[a][0] = "";
ServerGUI.rows1[a][1] = "";
ServerGUI.rows1[a][2] = "";
ServerGUI.rows1[a][3] = "";
for (int i = 0; i < hoeveel; i++) {
StringTokenizer str = new StringTokenizer(bidData[i], "@#@");
ServerGUI.rows1[i][0] = str.nextToken();
ServerGUI.rows1[i][1] = str.nextToken();
ServerGUI.rows1[i][2] = str.nextToken();
ServerGUI.rows1[i][3] = str.nextToken();
//Clean the table and reads the data into the Species table
public void readintoTable2(){
for(int a = 0; a < 40; a++){
ServerGUI.rows2[a][0] = "";
ServerGUI.rows2[a][1] = "";
for (int i = 0; i < hoeveel; i++) {
StringTokenizer str = new StringTokenizer(bidData[i], "@#@");
ServerGUI.rows2[i][0] = str.nextToken();
ServerGUI.rows2[i][1] = str.nextToken();
//Clean the table and reads the data into the User table
public void readintoTable3(){
for(int a = 0; a < 40; a++){
ServerGUI.rows3[a][0] = "";
ServerGUI.rows3[a][1] = "";
ServerGUI.rows3[a][2] = "";
for (int b = 0; b < hoeveel; b++) {
StringTokenizer str = new StringTokenizer(bidData, "@#@");
ServerGUI.rows3[b][0] = str.nextToken();
ServerGUI.rows3[b][1] = str.nextToken();
ServerGUI.rows3[b][2] = str.nextToken();
//add animal information to the Animal table in the database
public void addAnimal(String id , String name , String desc , String species_id){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String source = "jdbc:odbc:Database";
Connection dbconnect = DriverManager.getConnection(source);
Statement st = dbconnect.createStatement();
int toAdd;
String sqlstm = "INSERT INTO animals" + "(animal_id, animal_Name , description , species_id)" +
"VALUES (" + id + ", '" + name + "', '" + desc + "', " + species_id + ")";
toAdd = st.executeUpdate(sqlstm);
dbconnect.close();
JOptionPane.showMessageDialog(null , "New Record Added");
ServerGUI.refreshAnimal();
ServerGUI.currentT = 1;
open();
}catch(ClassNotFoundException cnf){
JOptionPane.showMessageDialog(null,
"Class Not Found -> " + cnf.toString(),
"Error!!",
JOptionPane.ERROR_MESSAGE);
System.out.println("classNotFound" + cnf);
}catch(SQLException se) {
JOptionPane.showMessageDialog(null,
"SQL Exception -> " + se.toString()
+ "\n Please make sure all data is entered correctly ",
"Error!!",
JOptionPane.ERROR_MESSAGE);
System.out.println("SqlExeption" + se);
//add animal information to the Species table in the database
public void addSpecies(String id1 , String name1){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String source = "jdbc:odbc:Database";
Connection dbconnect = DriverManager.getConnection(source);
Statement st = dbconnect.createStatement();
int toAdd;
String sqlstm = "INSERT INTO species" + "(species_id, species_name)" +
"VALUES ( '" + id1 + "', '" + name1 + "')";
toAdd = st.executeUpdate(sqlstm);
dbconnect.close();
JOptionPane.showMessageDialog(null , "New Record Added");
ServerGUI.refreshSpecies();
ServerGUI.currentT = 2;
open();
}catch(ClassNotFoundException cnf){
JOptionPane.showMessageDialog(null,
"Class Not Found -> " + cnf.toString(),
"Error!!",
JOptionPane.ERROR_MESSAGE);
System.out.println("classNotFound" + cnf);
}catch(SQLException se) {
JOptionPane.showMessageDialog(null,
"SQL Exception -> " + se.toString()
+ "\n Please make sure all data is entered correctly ",
"Error!!",
JOptionPane.ERROR_MESSAGE);
System.out.println("SqlExeption" + se);
//add animal information to the User table in the database
public void addUser(String id2 , String user , String pass){
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String source = "jdbc:odbc:Database";
Connection dbconnect = DriverManager.getConnection(source);
Statement st = dbconnect.createStatement();
int toAdd;
String sqlstm = "INSERT INTO user" + "(user_id, user_name ,user_password)" +
"VALUES ( '" + id2 + "', '" + user + "', '"+ pass + "')";
toAdd = st.executeUpdate(sqlstm);
dbconnect.close();
JOptionPane.showMessageDialog(null , "New Record Added");
ServerGUI.refreshUser();
ServerGUI.currentT = 3Your code is completely unreliable and it should be placed inside a code block when you add it. Also your question would be better off in the JDBC forum than the networking one.
-
Timer, Threads, TableModels, and adding a row. Need Help
Ok so essentially my problem is i guess pretty simple. Skip this next part to get to the problem.
My project: I'm simply building a bell server, pretty simple. Plays a sound/recording at a specific time. It also however, grabs the times off an RSS feed; additionally it plays announcements and bells, it also automatically recalculates times if you adjust one, it ensures that all bells/announcements do not overlap; (theres some other qualities but they don't matter).
My problem: I have essentially a few different classes in my project however there are only 2 that are giving me great amounts of grief at the moment. First is my main, it calls/sets up the GUI using a JFrame, I am using DefaultTableModel as my table model for a regular JTable. The main also creates an object called SchedManager, this object is what does all of the organizing, keeping the times up and such; the SchedManager object is also a timer task which is scheduled to run every 5 seconds, every time it runs it does a few things but primarily, it checks its Vector of SchedItems to make sure none overlap and such, after that, it calls a public method of TestMain's. This method simply calls a public method of SchedManger's that returns a 2D Object array of the items, then it attempts to update the tables data by using a quick method that updates all the tables data, however obviously I may need to add a row, so I have it add a row if necessary. This is my problem though, when I call model.addRow it blows up with a nullPointerException. Heres a simplified version of my code, all this code is attempting to do is to add a row every time SubClass is ran:
TestMain.java :
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
public class TestMain extends JFrame{
protected static Container container;
private static JTable table;
private static Vector data = new Vector();
private static Vector columns = new Vector();
public static DefaultTableModel model;
private static SubClass sub = new SubClass();
public static TestMain tm;
public TestMain() {
container = this.getContentPane();
private static void createAndShowGUI(){
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("Hell's Bells");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
columns.add("Test");
columns.add("Test2");
GridBagLayout gridbag = new GridBagLayout();
JPanel contentPane = new JPanel(gridbag);
container.setLayout(gridbag);
GridBagConstraints gbc = new GridBagConstraints();
gbc.fill = gbc.BOTH;
gbc.gridheight = 48;
gbc.gridwidth = 60;
gbc.gridx = 2;
gbc.gridy = 13;
gbc.weightx = .8;
gbc.weighty = .6;
model = new DefaultTableModel(data,columns);
table = new JTable(model);
gridbag.setConstraints(table, gbc);
container.add(table);
JButton update = new JButton("update");//Creates a new button update
ButtonListener updateButtonListener = new ButtonListener();//creates a new button listener
update.addActionListener(updateButtonListener);
container.add(update);
frame.setContentPane(container);
frame.setLocation(200,100);
frame.pack();
frame.setSize(new Dimension(750,800));
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
public static void updateTable(){
model.addRow(new Object[]{"test"});
static class ButtonListener implements ActionListener{
int value = 0;
public void actionPerformed(ActionEvent e){
String button = e.getActionCommand();
if(button == "update"){
System.out.println("TEST");
model.addRow(new Object[]{"test"});
table.setValueAt("TEST",0,0);
if(value==3)
table.setValueAt("TEST",0,1);
if(value==4)
table.setValueAt("TEST",3,0);
if(value==5)
table.setValueAt("TEST",2,1);
value++;
}SubClass.java :
import java.util.*;
public class SubClass extends TimerTask{
public static TestMain tm = new TestMain();
public SubClass(){
TimerTask task = this;
Timer manager = new Timer();
manager.schedule(task,0,5000);
public void run(){
//tm.model.addRow(new Object[]{"test"});
tm.updateTable();
}Does it have something to do with JFrame? because using almost identical code but using JPanel it works fine.
All help is greatly appreciated!
Thanks In Advance,
AirplaneWhoops, sorry bout' that. Heres the error I receive:
Exception in thread "Timer-0" java.lang.NullPointerException
at TestMain.updateTable(TestMain.java:81)
at SubClass.run(SubClass.java:17)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)Heres the printStackTrace(); when i put the thread in a try/catch:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at TestMain.createAndShowGUI(TestMain.java:39)
at TestMain.access$000(TestMain.java:7)
at TestMain$1.run(TestMain.java:80)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Regards,
Airplane
Message was edited by:
Airplane -
I need help! Can't seem to figure out how to update the captions in my imageViewer
I am creating an image viewer in which needs to update photos and update captions with next and previous features. I got the next, previous and image update to work. However, I am stuck on the captions. This is my code:
I have a main.as:
public class Main extends Sprite
private var _iv:ImageViewer;
private var _pictureList:Array;
private var _currentPicture:int;
private var _xmlData:XML;
public function Main()
var urlLoader:URLLoader=new URLLoader();
urlLoader.load(new URLRequest("xml/imageload.xml"));
urlLoader.addEventListener(Event.COMPLETE, onParse);
_iv=new ImageViewer();
_iv.path="images/";
_iv.imageList=["dogs1.jpg", "dogs2.jpg", "dogs3.jpg"];
_iv.display();
_iv.x = 110;
_iv.y = 10;
this.addChild(_iv);
var imageCaption:tfCaption = new tfCaption();
imageCaption.x = 140;
imageCaption.y = 350;
this.addChild(imageCaption);
var nextImage:NextButton = new NextButton();
nextImage.x = 445;
nextImage.y = 350;
nextImage.buttonMode = true;
this.addChild(nextImage);
nextImage.addEventListener(MouseEvent.CLICK, onNext);
var prevImage:PreviousButton = new PreviousButton();
prevImage.x = 105;
prevImage.y = 350;
prevImage.buttonMode = true;
this.addChild(prevImage);
prevImage.addEventListener(MouseEvent.CLICK, onPrev);
private function onParse(e:Event):void
_pictureList=[];
_xmlData= XML(e.target.data);
for each(var pic:XML in _xmlData.pic)
var vo:PicVO=new PicVO();
vo.file = pic.file;
vo.caption = pic.caption;
_pictureList.push(vo);
var _currentPicture:int = 0;
private function onNext(e:MouseEvent):void
_iv.next();
private function onPrev(e:MouseEvent):void
_iv.previous();
i have a imageLoader.as:
public class ImageLoader extends EventDispatcher
private var _xmlData:XML = XML("xml/imageload.xml");
private var ld:Loader;
public function ImageLoader(file:String)
super();
ld = new Loader(); //creates new Loader instance
ld.load(new URLRequest(file)); //requests new file to load
ld.contentLoaderInfo.addEventListener(Event.COMPLE TE, onLoad); //listens for loader to finish loading (xml)
private function onLoad(e:Event):void //onLoad function
var evt:ImageEvent = new ImageEvent(ImageEvent.IMAGE_LOADED); //
evt.image = e.target.content; //image is the current content
dispatchEvent(evt); //dispatches ImageEvent to find out if image finished loading
ld.contentLoaderInfo.removeEventListener(Event.COM PLETE, onLoad); //stop listening
ld.unload(); //stop loading process
ld = null;
i have a imageViewer.as:
public class ImageViewer extends Sprite
private var _imageList:Array;
private var _path:String;
private var _currentImage:int;
private var _ld:ImageLoader;
public function ImageViewer()
super();
init(); //runs the init function
private function init():void //init functionx
_imageList=[]; //creates instance of the array
_currentImage=0; //creates starting point for current image or image 1(0) used for validation
private function loadImg():void //loadImg function
_ld=new ImageLoader(_path+_imageList[_currentImage]); //loads current image
_ld.addEventListener(ImageEvent.IMAGE_LOADED, onLoad); //listens for image to finish loading
private function onLoad(e:ImageEvent):void //onLoad function
if(this.numChildren>0) //if there is a picture on the stage
this.removeChildAt(0); //takes that image off stage
this.addChild(e.image); //adds new image
public function display():void //display function
loadImg(); //runs the loadImg function
public function next():void //next function - goes to next photo
_currentImage++; //moves to next image in the array
if (_currentImage==_imageList.length)
_currentImage=0; //validates new image
_ld=new ImageLoader(_path+_imageList[_currentImage]); //loads image
_ld.addEventListener(ImageEvent.IMAGE_LOADED, onLoad); //listens for image to load
public function previous():void //goes to previous image
_currentImage--;
if (_currentImage<0)
_currentImage=_imageList.length-1; //validates image and moves back one
_ld=new ImageLoader(_path+_imageList[_currentImage]);
_ld.addEventListener(ImageEvent.IMAGE_LOADED, onLoad);
public function set path(value:String):void
_path=value; //setting the path to its variable(value) - file path
public function set imageList(value:Array):void
_imageList=value; //setting the array to its variables(values)
an imageEvent.as:
public class ImageEvent extends Event
public static const IMAGE_LOADED:String = "image_loaded";
public var image:Bitmap;
public function ImageEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
super(type, bubbles, cancelable);
public override function clone():Event
return new ImageEvent(type, bubbles, cancelable);
a picVO (value object):
public class PicVO
public var file:String;
public var caption:String;
public function PicVO()
my xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<images>
<pic>
<file>dogs1.jpg</file>
<caption>Scrappy and Akiva snuggled up</caption>
</pic>
<pic>
<file>dogs2.jpg</file>
<caption>Scrappy being a cutie pie!</caption>
</pic>
<pic>
<file>dogs3.jpg</file>
<caption>Bella and Scrappy playing</caption>
</pic>
</images>
Can anyone help me?
Many thanks in advance!is there more than one _xmlData.pic.caption node in your xml?
if yes, the following should be tracing more than one caption:
for each(var pic:XML in _xmlData.pic)
var vo:PicVO=new PicVO();
vo.file = pic.file;
vo.caption = pic.caption;
trace(pic.caption);
_pictureList.push(vo);
if it does not, you probably have a malformatted xml.
if you can't easily find the problem, copy and paste your xml.
Maybe you are looking for
-
Using oracle function in order by clause
Hello, can i use report query or report that generate query like this : select fname, lname from peoples order by dbms_random.value; dbms_random is an oracle function to generate random value. Thnaks
-
Failed installation: How to rerun Adobe Application Manager updates for Photoshop CS6
Hi. The installation of Adobe Extension Manager CS6 failed - while 2 others update for Photoshop CS6 did intall. I was installing Adobe Reader X . That's why I discovered the notication from the application manager about updates for CS6 - and I just
-
I mean I want to control the "start" and "stop" of a VI with another VI. Thanks
-
I've used Photoshop for years but Lightroom is very much harder to use. All I want to do is re-size a photo to put on the web, print a particular size, etc. This should be easy but I give up.
-
MODBUS/TCP very slow execution
Dear all We are new user to Labview and to LabVIEW forum. We are designing a LabVIEW application that interacts with PLCs. We are trying to exchange information between a PC/labview and a PLC. Both support the MODBUS/TCP protocole. We have designed t