java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0

GitHub | subdigital | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Uncaught Exception: Width (0) and height (0) cannot be <= 0

    GitHub | 5 months ago | subdigital
    java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
  2. 0

    Cannot take populate JTextfield

    Coderanch | 7 years ago | Rohit Kedia
    java.lang.IllegalArgumentException: adding a window to a container

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Width (0) and height (0) cannot be <= 0

      at java.awt.image.DirectColorModel.createCompatibleWritableRaster()
    2. Java RT
      JOptionPane.showConfirmDialog
      1. java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1016)
      2. java.awt.image.BufferedImage.<init>(BufferedImage.java:351)
      3. sun.lwawt.macosx.CImage.toImage(CImage.java:256)
      4. sun.lwawt.macosx.CImage.lambda$toImage$0(CImage.java:250)
      5. sun.awt.image.MultiResolutionCachedImage.getResolutionVariant(MultiResolutionCachedImage.java:66)
      6. sun.awt.image.MultiResolutionCachedImage.getBaseImage(MultiResolutionCachedImage.java:106)
      7. sun.awt.image.AbstractMultiResolutionImage.getWidth(AbstractMultiResolutionImage.java:82)
      8. sun.awt.image.MultiResolutionCachedImage.getWidth(MultiResolutionCachedImage.java:89)
      9. sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3262)
      10. sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3214)
      11. com.apple.laf.AquaIcon$CachingScalingIcon.paintIcon(AquaIcon.java:154)
      12. javax.swing.plaf.IconUIResource.paintIcon(IconUIResource.java:72)
      13. javax.swing.plaf.basic.BasicLabelUI.paint(BasicLabelUI.java:167)
      14. javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
      15. javax.swing.JComponent.paintComponent(JComponent.java:780)
      16. javax.swing.JComponent.paint(JComponent.java:1056)
      17. javax.swing.JComponent.paintChildren(JComponent.java:889)
      18. javax.swing.JComponent.paint(JComponent.java:1065)
      19. javax.swing.JComponent.paintChildren(JComponent.java:889)
      20. javax.swing.JComponent.paint(JComponent.java:1065)
      21. javax.swing.JComponent.paintChildren(JComponent.java:889)
      22. javax.swing.JComponent.paint(JComponent.java:1065)
      23. javax.swing.JComponent.paintChildren(JComponent.java:889)
      24. javax.swing.JComponent.paint(JComponent.java:1065)
      25. javax.swing.JComponent.paintChildren(JComponent.java:889)
      26. javax.swing.JComponent.paint(JComponent.java:1065)
      27. javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
      28. javax.swing.JComponent.paintChildren(JComponent.java:889)
      29. javax.swing.JComponent.paintToOffscreen(JComponent.java:5217)
      30. javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
      31. javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
      32. javax.swing.RepaintManager.paint(RepaintManager.java:1272)
      33. javax.swing.JComponent.paint(JComponent.java:1042)
      34. java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39)
      35. sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:79)
      36. sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116)
      37. java.awt.Container.paint(Container.java:1975)
      38. java.awt.Window.paint(Window.java:3904)
      39. javax.swing.RepaintManager$4.run(RepaintManager.java:842)
      40. javax.swing.RepaintManager$4.run(RepaintManager.java:814)
      41. java.security.AccessController.doPrivileged(Native Method)
      42. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      43. javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
      44. javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
      45. javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
      46. javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
      47. javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
      48. java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      49. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      50. java.awt.EventQueue.access$500(EventQueue.java:97)
      51. java.awt.EventQueue$3.run(EventQueue.java:709)
      52. java.awt.EventQueue$3.run(EventQueue.java:703)
      53. java.security.AccessController.doPrivileged(Native Method)
      54. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      55. java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      56. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      57. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      58. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
      59. java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
      60. java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
      61. java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
      62. java.security.AccessController.doPrivileged(Native Method)
      63. java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
      64. java.awt.Dialog.show(Dialog.java:1084)
      65. javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:869)
      66. javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:795)
      67. javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:757)
      68. javax.swing.JOptionPane.showConfirmDialog(JOptionPane.java:718)
      68 frames
    3. amidst.gui.main
      Menus.lambda$item$55
      1. amidst.gui.main.SeedPrompt.askForSeed(SeedPrompt.java:129)
      2. amidst.gui.main.MainWindow.askForSeed(MainWindow.java:219)
      3. amidst.gui.main.Actions.newFromSeed(Actions.java:63)
      4. amidst.gui.main.menu.Menus.lambda$item$55(Menus.java:131)
      4 frames
    4. Java RT
      EventDispatchThread.run
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      2. javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
      3. javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      4. javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      5. javax.swing.AbstractButton.doClick(AbstractButton.java:376)
      6. com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
      7. java.awt.MenuItem.processActionEvent(MenuItem.java:669)
      8. java.awt.MenuItem.processEvent(MenuItem.java:628)
      9. java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:351)
      10. java.awt.MenuComponent.dispatchEvent(MenuComponent.java:339)
      11. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:761)
      12. java.awt.EventQueue.access$500(EventQueue.java:97)
      13. java.awt.EventQueue$3.run(EventQueue.java:709)
      14. java.awt.EventQueue$3.run(EventQueue.java:703)
      15. java.security.AccessController.doPrivileged(Native Method)
      16. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      17. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      18. java.awt.EventQueue$4.run(EventQueue.java:731)
      19. java.awt.EventQueue$4.run(EventQueue.java:729)
      20. java.security.AccessController.doPrivileged(Native Method)
      21. java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      22. java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      23. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      24. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      25. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      26. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      27. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      28. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      28 frames