{"id":906,"date":"2019-02-17T18:12:55","date_gmt":"2019-02-17T09:12:55","guid":{"rendered":"https:\/\/chat-messenger.com\/?p=906"},"modified":"2019-07-03T00:05:55","modified_gmt":"2019-07-02T15:05:55","slug":"%e0%b9%84%e0%b8%ad%e0%b8%84%e0%b8%ad%e0%b8%99%e0%b8%96%e0%b8%b2%e0%b8%94%e0%b8%81%e0%b8%b0%e0%b8%9e%e0%b8%a3%e0%b8%b4%e0%b8%9a","status":"publish","type":"post","link":"https:\/\/chat-messenger.com\/th\/blog\/java\/trayicon-blink","title":{"rendered":"\u0e41\u0e2a\u0e14\u0e07\/\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19 Java"},"content":{"rendered":"<h2><a name=\"0\">\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32\u0e08\u0e32\u0e27\u0e32<strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\uff08<strong>\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<\/strong>\u0e44\u0e2d\u0e04\u0e2d\u0e19 )<strong>\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\/\u0e01\u0e32\u0e23\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<\/strong><\/a><\/h2>\n<p>\u0e43\u0e19\u0e20\u0e32\u0e29\u0e32\u0e08\u0e32\u0e27\u0e32<strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\uff08<strong>\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<\/strong>\u0e2a\u0e48\u0e27\u0e19\u0e19\u0e35\u0e49\u0e08\u0e30\u0e41\u0e19\u0e30\u0e19\u0e33\u0e04\u0e25\u0e32\u0e2a\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e25\u0e30\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e44\u0e2d\u0e04\u0e2d\u0e19 )<\/p>\n<p>\u0e04\u0e25\u0e32\u0e2a\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49\u0e16\u0e39\u0e01\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e43\u0e2b\u0e21\u0e48\u0e43\u0e19 Java SE 6 Mustang <strong>java.awt.SystemTray<\/strong> \u3001<strong>java.awt.TrayIcon<\/strong> \u0e40\u0e23\u0e32\u0e08\u0e30\u0e43\u0e0a\u0e49\u0e04\u0e25\u0e32\u0e2a\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e19\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e08\u0e30\u0e08\u0e31\u0e14\u0e40\u0e15\u0e23\u0e35\u0e22\u0e21\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e0a\u0e48\u0e27\u0e22\u0e43\u0e2b\u0e49\u0e04\u0e38\u0e13\u0e40\u0e02\u0e49\u0e32\u0e43\u0e08\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<\/p>\n<h3><a name=\"1\">\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a (\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19)<\/a><\/h3>\n<p>\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a (\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19) \u0e2b\u0e21\u0e32\u0e22\u0e16\u0e36\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e02\u0e19\u0e32\u0e14\u0e40\u0e25\u0e47\u0e01\u0e17\u0e35\u0e48\u0e40\u0e23\u0e35\u0e22\u0e07\u0e01\u0e31\u0e19\u0e2d\u0e22\u0e39\u0e48\u0e21\u0e38\u0e21\u0e25\u0e48\u0e32\u0e07\u0e02\u0e27\u0e32\u0e02\u0e2d\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d\u0e04\u0e2d\u0e21\u0e1e\u0e34\u0e27\u0e40\u0e15\u0e2d\u0e23\u0e4c Java SE 6 \u0e44\u0e14\u0e49\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e04\u0e25\u0e32\u0e2a\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<\/p>\n<ul>\n<li><strong>java.awt.SystemTray<\/strong><br \/>\n\u0e04\u0e25\u0e32\u0e2a SystemTray \u0e41\u0e2a\u0e14\u0e07\u0e16\u0e36\u0e07\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a\u0e1a\u0e19\u0e40\u0e14\u0e2a\u0e01\u0e4c\u0e17\u0e47\u0e2d\u0e1b<\/li>\n<li><strong>java.awt.TrayIcon<\/strong><br \/>\n\u0e2d\u0e47\u0e2d\u0e1a\u0e40\u0e08\u0e47\u0e01\u0e15\u0e4c TrayIcon \u0e04\u0e37\u0e2d\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a\u0e17\u0e35\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e07\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a\u0e44\u0e14\u0e49<\/li>\n<\/ul>\n<h3>\u0e27\u0e34\u0e18\u0e35\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<\/h3>\n<p>\u0e04\u0e38\u0e13\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e44\u0e14\u0e49<br \/>\u0e2d\u0e31\u0e1b\u0e42\u0e2b\u0e25\u0e14\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n<a href=\"https:\/\/www.bannerkoubou.com\/anime\/\" target=\"_blank\"><strong>https:\/\/www.bannerkoubou.com\/anime\/<\/strong><\/a><\/p>\n<h2 class=\"common_title\"><a name=\"3\">\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e43\u0e1a\u0e2a\u0e21\u0e31\u0e04\u0e23<\/a><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/chat-messenger.com\/images\/task_tray.jpg\" alt=\"\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19 \u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a java.awt.SystemTray java.awt.TrayIcon\" border=\"0\"><br \/>\n<br clear=\"all\"><\/p>\n<p>\n\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e43\u0e0a\u0e49\u0e04\u0e25\u0e32\u0e2a\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a TaskTrayUtil \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<\/p>\n<ol>\n<li>\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e04\u0e38\u0e13\u0e40\u0e23\u0e34\u0e48\u0e21\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\u306b<strong>\u0e44\u0e2d\u0e04\u0e2d\u0e19<\/strong>\u0e41\u0e2a\u0e14\u0e07.\n<\/li>\n<li>\u0e01\u0e32\u0e23\u0e04\u0e25\u0e34\u0e01 [\u0e1b\u0e38\u0e48\u0e21\u0e17\u0e35\u0e48\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a] \u0e08\u0e30<strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n\t\u0e19\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e19\u0e35\u0e49 \u0e22\u0e31\u0e07\u0e21\u0e35\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21 &quot;\u0e1b\u0e25\u0e48\u0e2d\u0e22\u0e09\u0e31\u0e19\u0e2d\u0e2d\u0e01\u0e44\u0e1b\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48!!&quot; \u0e1a\u0e19\u0e25\u0e39\u0e01\u0e42\u0e1b\u0e48\u0e07\u0e2d\u0e35\u0e01\u0e14\u0e49\u0e27\u0e22<\/li>\n<li>\u0e01\u0e32\u0e23\u0e04\u0e25\u0e34\u0e01\u0e1b\u0e38\u0e48\u0e21 [\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19] \u0e08\u0e30\u0e2b\u0e22\u0e38\u0e14\u0e01\u0e32\u0e23\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e02\u0e2d\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19<\/li>\n<li><strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\u0e04\u0e25\u0e34\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e14\u0e49\u0e27\u0e22\u0e01\u0e32\u0e23\u0e04\u0e25\u0e34\u0e01\u0e0b\u0e49\u0e32\u0e22\u0e04\u0e23\u0e31\u0e49\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e2b\u0e25\u0e31\u0e01\u0e01\u0e25\u0e31\u0e1a\u0e21\u0e32\u0e41\u0e2a\u0e14\u0e07\u0e1a\u0e19\u0e40\u0e14\u0e2a\u0e01\u0e4c\u0e17\u0e47\u0e2d\u0e1b<\/li>\n<li><strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\u0e04\u0e25\u0e34\u0e01\u0e02\u0e27\u0e32\u0e17\u0e35\u0e48\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e40\u0e21\u0e19\u0e39 PopupMenu \u0e15\u0e32\u0e21\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19<\/li>\n<li>\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e2b\u0e25\u0e31\u0e01\u0e16\u0e39\u0e01\u0e22\u0e48\u0e2d\u0e25\u0e07<strong>\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<\/strong>\u0e40\u0e01\u0e47\u0e1a\u0e44\u0e27\u0e49\u0e43\u0e19.<\/li>\n<\/ol>\n<h2 class=\"common_title\"><a name=\"4\">\u0e01\u0e32\u0e23\u0e44\u0e14\u0e49\u0e21\u0e32\u0e0b\u0e36\u0e48\u0e07\u0e0b\u0e2d\u0e23\u0e4c\u0e2a\u0e42\u0e04\u0e49\u0e14<\/a><\/h2>\n<p><script type=\"text\/javascript\" src=\"https:\/\/chat-messenger.com\/js\/common.js?dd12sssas2223\" charset=\"UTF-8\"><\/script><br \/>\n<script type=\"text\/javascript\"> writePR(); <\/script><\/p>\n<p>\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14\u0e0b\u0e2d\u0e23\u0e4c\u0e2a\u0e42\u0e04\u0e49\u0e14\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49 \u0e2b\u0e32\u0e01\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e04\u0e2d\u0e21\u0e44\u0e1e\u0e25\u0e4c \u0e42\u0e1b\u0e23\u0e14\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e44\u0e27\u0e49\u0e43\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e1a\u0e0b\u0e2d\u0e23\u0e4c\u0e2a\u0e42\u0e04\u0e49\u0e14\u0e14\u0e49\u0e27\u0e22<\/p>\n<ul>\n<li><strong>\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e1b\u0e01\u0e15\u0e34<\/strong>\u3000<a href=\"https:\/\/chat-messenger.com\/images\/tray_icon.gif\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/chat-messenger.com\/images\/tray_icon.gif\" alt=\"\" border=\"0\"><\/a><\/li>\n<li><strong>\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<\/strong>\u3000<a href=\"https:\/\/chat-messenger.com\/images\/tray_icon_light.gif\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/chat-messenger.com\/images\/tray_icon_light.gif\" alt=\"\" border=\"0\"><\/a><\/li>\n<\/ul>\n<p><textarea readonly=\"readonly\" style=\"font-size: 13px;height: 400px;\" class=\"src\" onclick=\"this.focus();this.select()\">import java.awt.AWTException;<br \/>\nimport java.awt.Dimension;<br \/>\nimport java.awt.FlowLayout;<br \/>\nimport java.awt.Image;<br \/>\nimport java.awt.MenuItem;<br \/>\nimport java.awt.PopupMenu;<br \/>\nimport java.awt.SystemTray;<br \/>\nimport java.awt.TrayIcon;<br \/>\nimport java.awt.event.ActionEvent;<br \/>\nimport java.awt.event.ActionListener;<br \/>\nimport java.awt.event.MouseAdapter;<br \/>\nimport java.awt.event.MouseEvent;<br \/>\nimport java.awt.event.MouseListener;<br \/>\nimport java.awt.event.WindowAdapter;<br \/>\nimport java.awt.event.WindowEvent;<br \/>\nimport java.awt.event.WindowListener;<\/p>\n<p>import javax.swing.ImageIcon;<br \/>\nimport javax.swing.JButton;<br \/>\nimport javax.swing.JFrame;<br \/>\nimport javax.swing.JPanel;<br \/>\nimport javax.swing.SwingUtilities;<br \/>\nimport javax.swing.UIManager;<\/p>\n<p>\/**<br \/>\n * \u0e41\u0e2a\u0e14\u0e07\u0e41\u0e25\u0e30\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a (Task Tray\/System Tray) \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 Java<br \/>\n *<br \/>\n * \u25c6 \u0e20\u0e32\u0e1e\u0e23\u0e27\u0e21\u0e02\u0e2d\u0e07\u0e04\u0e25\u0e32\u0e2a\u0e19\u0e35\u0e49<br \/>\n * \u0e04\u0e25\u0e32\u0e2a TaskTray \u0e40\u0e1b\u0e47\u0e19\u0e22\u0e39\u0e17\u0e34\u0e25\u0e34\u0e15\u0e35\u0e49\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19 (Task Tray)<br \/>\n * \u0e04\u0e38\u0e13\u0e2a\u0e21\u0e1a\u0e31\u0e15\u0e34\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e21\u0e35\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23:<br \/>\n * \u0e41\u0e2a\u0e14\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n * \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e41\u0e08\u0e49\u0e07\u0e40\u0e15\u0e37\u0e2d\u0e19\u0e41\u0e1a\u0e1a\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1e\u0e08\u0e30\u0e1b\u0e23\u0e32\u0e01\u0e0f\u0e02\u0e36\u0e49\u0e19\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n * \u0e17\u0e33\u0e43\u0e2b\u0e49\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n *<br \/>\n * \u25c6 \u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<br \/>\n * \u0e2a\u0e48\u0e07\u0e04\u0e25\u0e32\u0e2a JFrame \u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e32\u0e23\u0e4c\u0e01\u0e34\u0e27\u0e40\u0e21\u0e19\u0e15\u0e4c\u0e43\u0e2b\u0e49\u0e01\u0e31\u0e1a\u0e40\u0e21\u0e18\u0e2d\u0e14\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49<br \/>\n * \u30fbcreateTray(JFrame targetFrame)<br \/>\n * \u30fbcreateTray(final JFrame targetFrame, Image image, PopupMenu menu)<br \/>\n *<br \/>\n *\/<br \/>\n\u0e04\u0e25\u0e32\u0e2a\u0e2a\u0e32\u0e18\u0e32\u0e23\u0e13\u0e30 TaskTrayUtil {<br \/>\n    \u0e40\u0e1f\u0e23\u0e21 JFrame \u0e2a\u0e48\u0e27\u0e19\u0e15\u0e31\u0e27\u0e41\u0e1a\u0e1a\u0e04\u0e07\u0e17\u0e35\u0e48;<br \/>\n    private static PopupMenu defaultMenu;<br \/>\n    private static TrayIcon trayIcon;<br \/>\n    private static SystemTray tray = SystemTray.getSystemTray();<br \/>\n    private static Object INSTANCE_LOCK = new Object();<\/p>\n<p>    \/**<br \/>\n     * \u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<br \/>\n     * @param args<br \/>\n     *\/<br \/>\n    public static void main(String[] args) {<br \/>\n      \u0e1e\u0e22\u0e32\u0e22\u0e32\u0e21 {<br \/>\n          \/\/ \u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32 LookAndFeel \u0e40\u0e1b\u0e47\u0e19 Windows<br \/>\n          UIManager.setLookAndFeel(<br \/>\n                  UIManager.getSystemLookAndFeelClassName());<br \/>\n          \/\/ \u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e21\u0e32\u0e15\u0e23\u0e10\u0e32\u0e19<br \/>\n          final Image img = new ImageIcon(<br \/>\n                  TaskTrayUtil.class.getResource(<br \/>\n                          \u201ctray_icon.gif\u201d)).getImage();<br \/>\n          \u0e40\u0e1f\u0e23\u0e21 JFrame \u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22 =<br \/>\n              \u0e2a\u0e23\u0e49\u0e32\u0e07 JFrame \u0e43\u0e2b\u0e21\u0e48 (&quot;\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e25\u0e30\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a&quot;);<br \/>\n          frame.setSize(300, 100);<br \/>\n          frame.setIconImage(img);<br \/>\n          \/\/ \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e41\u0e25\u0e49\u0e27 \u0e43\u0e2b\u0e49\u0e22\u0e48\u0e2d\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e25\u0e07\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<br \/>\n          \/\/ \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e04\u0e25\u0e32\u0e2a WindowListener \u0e15\u0e32\u0e21\u0e17\u0e35\u0e48\u0e41\u0e2a\u0e14\u0e07\u0e44\u0e27\u0e49<br \/>\n          frame.addWindowListener(new WindowAdapter() {<br \/>\n              public void windowIconified(WindowEvent e) {<br \/>\n                  frame.setVisible(false);<br \/>\n              }<br \/>\n          });<\/p>\n<p>          JPanel jPanel = new JPanel();<br \/>\n          jPanel.setLayout(new FlowLayout());<br \/>\n          jPanel.setSize(new Dimension(219, 70));<br \/>\n          \/\/ \u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n          \u0e20\u0e32\u0e1e\u0e2a\u0e38\u0e14\u0e17\u0e49\u0e32\u0e22 imgLight =<br \/>\n              \u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e21\u0e48 (TaskTrayUtil.class.getResource(<br \/>\n                      \u201ctray_icon_light.gif\u201d)).getImage();<br \/>\n          JButton lightButton = new JButton(&#8220;\u70b9\u6ec5&#8221;);<br \/>\n          \u0e1b\u0e38\u0e48\u0e21\u0e44\u0e1f.\u0e40\u0e1e\u0e34\u0e48\u0e21 ActionListener(\u0e43\u0e2b\u0e21\u0e48 ActionListener(){<br \/>\n              public void actionPerformed(ActionEvent e) {<br \/>\n                  onAndOffLight(imgLight, null);<br \/>\n                  displayMessage(&quot;\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21&quot;, &quot;\u0e1b\u0e25\u0e48\u0e2d\u0e22\u0e09\u0e31\u0e19\u0e2d\u0e2d\u0e01\u0e44\u0e1b\u0e08\u0e32\u0e01\u0e17\u0e35\u0e48\u0e19\u0e35\u0e48!!&quot;);<br \/>\n              }<br \/>\n          });<br \/>\n          JButton cancelButton = new JButton(&#8220;\u89e3\u9664&#8221;);<br \/>\n          cancelButton.addActionListener(new ActionListener(){<br \/>\n              public void actionPerformed(ActionEvent e) {<br \/>\n                  replaceImageWithDelete(img);<br \/>\n              }<br \/>\n          });<br \/>\n          jPanel.add(lightButton, null);<br \/>\n          jPanel.add(cancelButton, null);<br \/>\n          frame.add(jPanel);<br \/>\n          \/\/ \u0e01\u0e32\u0e23\u0e1b\u0e23\u0e30\u0e21\u0e27\u0e25\u0e1c\u0e25\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e2a\u0e34\u0e49\u0e19\u0e2a\u0e38\u0e14\u0e23\u0e2d\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e07\u0e32\u0e19<br \/>\n          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<br \/>\n          \/\/ \u0e41\u0e2a\u0e14\u0e07\u0e01\u0e23\u0e2d\u0e1a\u0e20\u0e32\u0e1e\u0e44\u0e27\u0e49\u0e15\u0e23\u0e07\u0e01\u0e25\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d<br \/>\n          \u0e40\u0e1f\u0e23\u0e21.\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e2a\u0e31\u0e21\u0e1e\u0e31\u0e17\u0e18\u0e4c\u0e01\u0e31\u0e1a (null);<br \/>\n          \/\/ \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e16\u0e32\u0e14\u0e07\u0e32\u0e19<br \/>\n          TaskTrayUtil.createTray(frame);<br \/>\n          frame.setVisible(true);<\/p>\n<p>      } catch (Exception e) {<br \/>\n          e.printStackTrace();<br \/>\n      }<br \/>\n    }<br \/>\n    \/**<br \/>\n     *<br \/>\n     *\/<br \/>\n    static {<br \/>\n        createPopupMenu();<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e40\u0e21\u0e19\u0e39 PopupMenu \u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     * \u0e40\u0e21\u0e19\u0e39\u0e2d\u0e32\u0e2b\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e44\u0e1b\u0e19\u0e35\u0e49\u0e21\u0e35\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23<br \/>\n     * \u0e25\u0e1a\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19<br \/>\n     * \u0e25\u0e1a\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19 \u0e41\u0e25\u0e49\u0e27\u0e22\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e40\u0e14\u0e2a\u0e01\u0e4c\u0e17\u0e47\u0e2d\u0e1b<br \/>\n     *\u0e19\u0e33\u0e2d\u0e2d\u0e01\u0e44\u0e1b<br \/>\n     * (\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e2b\u0e19\u0e49\u0e32\u0e15\u0e48\u0e32\u0e07\u0e41\u0e25\u0e30\u0e19\u0e33\u0e21\u0e32\u0e44\u0e27\u0e49\u0e14\u0e49\u0e32\u0e19\u0e2b\u0e19\u0e49\u0e32)<br \/>\n     * \u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e01\u0e32\u0e23\u0e19\u0e35\u0e49\u0e08\u0e30\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e16\u0e39\u0e01\u0e1b\u0e34\u0e14\u0e25\u0e07<br \/>\n     *\/<br \/>\n    private static void createPopupMenu() {<br \/>\n        MenuItem getTrayItem = new MenuItem(&#8220;\u30bf\u30b9\u30af\u30c8\u30ec\u30a4\u304b\u3089\u53d6\u308a\u51fa\u3059&#8221;);<br \/>\n        getTrayItem.addActionListener(new ActionListener() {<br \/>\n            public void actionPerformed(ActionEvent e) {<br \/>\n                \u0e04\u0e25\u0e48\u0e2d\u0e07\u0e41\u0e04\u0e25\u0e48\u0e27();<br \/>\n            }<br \/>\n        });<br \/>\n        MenuItem exitItem = new MenuItem(&#8220;\u7d42\u4e86&#8221;);<br \/>\n        exitItem.addActionListener(new ActionListener() {<br \/>\n            public void actionPerformed(ActionEvent e) {<br \/>\n                removeTrayIcon();<br \/>\n                TaskTrayUtil.frame.setVisible(false);<br \/>\n                TaskTrayUtil.frame.dispose();<br \/>\n                \u0e23\u0e30\u0e1a\u0e1a\u0e2d\u0e2d\u0e01(0);<br \/>\n            }<br \/>\n        });<br \/>\n        defaultMenu = new PopupMenu();<br \/>\n        defaultMenu.add(getTrayItem);<br \/>\n        defaultMenu.add(exitItem);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a\u0e41\u0e25\u0e30\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e07\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     * \u0e15\u0e31\u0e27\u0e23\u0e31\u0e1a\u0e1f\u0e31\u0e07\u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e17\u0e35\u0e48\u0e40\u0e01\u0e34\u0e14\u0e02\u0e36\u0e49\u0e19\u0e1a\u0e19\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e08\u0e30\u0e16\u0e39\u0e01\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19 targetFrame<br \/>\n     \u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19 *.<br \/>\n     * \u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e19\u0e35\u0e49\u0e40\u0e01\u0e34\u0e14\u0e02\u0e36\u0e49\u0e19\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e14\u0e31\u0e1a\u0e40\u0e1a\u0e34\u0e49\u0e25\u0e04\u0e25\u0e34\u0e01\u0e17\u0e35\u0e48\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     * \u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22<br \/>\n     * @param targetFrame \u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22<br \/>\n     *\/<br \/>\n    public static void createTray(JFrame targetFrame) {<br \/>\n        createTray(targetFrame, null, null);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a\u0e41\u0e25\u0e30\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e25\u0e07\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     *<br \/>\n     * @param targetFrame \u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22<br \/>\n     * @param image \u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     * \u0e2b\u0e32\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e48\u0e32\u0e27\u0e48\u0e32\u0e07 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e23\u0e31\u0e1a\u0e04\u0e48\u0e32\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01 targetFrame \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 getIconImage()<br \/>\n     * \u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e01\u0e2d\u0e1a\u0e43\u0e0a\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e1b\u0e47\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19<br \/>\n     * @param menu \u0e40\u0e21\u0e19\u0e39\u0e41\u0e1a\u0e1a\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1e\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07\u0e43\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n     * \u0e2b\u0e32\u0e01\u0e04\u0e48\u0e32\u0e40\u0e1b\u0e47\u0e19 null \u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07 PopupMenu \u0e15\u0e32\u0e21\u0e04\u0e48\u0e32\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19<br \/>\n     *\/<br \/>\n    public static void createTray(final JFrame targetFrame, Image image,<br \/>\n            \u0e40\u0e21\u0e19\u0e39\u0e41\u0e1a\u0e1a\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1e) {<br \/>\n        \/\/ \u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e2b\u0e32\u0e01\u0e23\u0e30\u0e1a\u0e1a\u0e16\u0e32\u0e14\u0e44\u0e21\u0e48\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a<br \/>\n        \u0e2b\u0e32\u0e01 SystemTray \u0e44\u0e21\u0e48\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a {<br \/>\n            \u0e01\u0e25\u0e31\u0e1a;<br \/>\n        }<br \/>\n        TaskTrayUtil.frame = targetFrame;<br \/>\n        \u0e16\u0e49\u0e32 (\u0e20\u0e32\u0e1e == null) {<br \/>\n            image = targetFrame.getIconImage();<br \/>\n        }<br \/>\n        \u0e16\u0e49\u0e32 (\u0e40\u0e21\u0e19\u0e39 == null) {<br \/>\n            \u0e40\u0e21\u0e19\u0e39 = \u0e40\u0e21\u0e19\u0e39\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19;<br \/>\n        }<br \/>\n        trayIcon = new TrayIcon(image, targetFrame.getTitle(), menu);<br \/>\n        trayIcon.setImageAutoSize(true);<br \/>\n        trayIcon.addMouseListener(new MouseAdapter(){<br \/>\n            public void mouseClicked(MouseEvent e) {<br \/>\n                \u0e16\u0e49\u0e32 (SwingUtilities.isLeftMouseButton(e)) {<br \/>\n                    \u0e04\u0e25\u0e48\u0e2d\u0e07\u0e41\u0e04\u0e25\u0e48\u0e27();<br \/>\n                }<br \/>\n            }<br \/>\n        });<br \/>\n        \u0e1e\u0e22\u0e32\u0e22\u0e32\u0e21 {<br \/>\n            tray.add(trayIcon);<br \/>\n        } catch (AWTException e1) {<br \/>\n            e1.printStackTrace();<br \/>\n        }<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e25\u0e1a\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19<br \/>\n     * \u0e15\u0e49\u0e2d\u0e07\u0e40\u0e23\u0e35\u0e22\u0e01\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e19\u0e19\u0e35\u0e49\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e1b\u0e34\u0e14\u0e15\u0e31\u0e27\u0e25\u0e07<br \/>\n     *\/<br \/>\n    public static void removeTrayIcon() {<br \/>\n        tray.remove(trayIcon);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e17\u0e33\u0e43\u0e2b\u0e49\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n     * @param msg \u0e2b\u0e32\u0e01\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19 \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e04\u0e25\u0e34\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e01\u0e23\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n     * \u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e17\u0e35\u0e48\u0e08\u0e30\u0e41\u0e2a\u0e14\u0e07<br \/>\n     *\/<br \/>\n    public static void onAndOffLight(Image lightImg, String msg) {<br \/>\n        \u0e41\u0e17\u0e19\u0e17\u0e35\u0e48\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e (lightImg);<br \/>\n        ChangeLightImgAdapter adap =<br \/>\n            \u0e43\u0e2b\u0e21\u0e48 TaskTrayUtil().new ChangeLightImgAdapter(msg);<br \/>\n        trayIcon.addMouseListener(adap);<br \/>\n        frame.addWindowListener(adap);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19<br \/>\n     * @param image \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e15\u0e01\u0e15\u0e48\u0e32\u0e07\u0e08\u0e32\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19<br \/>\n     *\/<br \/>\n    public static void replaceImage(Image image) {<br \/>\n        \u0e0b\u0e34\u0e07\u0e42\u0e04\u0e23\u0e44\u0e19\u0e0b\u0e4c (INSTANCE_LOCK) {<br \/>\n            \u0e16\u0e49\u0e32 (!image.equals(trayIcon.getImage())) {<br \/>\n                trayIcon.setImage(image);<br \/>\n            }<br \/>\n        }<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e43\u0e19\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19<br \/>\n     * \u0e2b\u0e32\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e01\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e14\u0e49\u0e27\u0e22\u0e40\u0e2b\u0e15\u0e38\u0e1c\u0e25\u0e43\u0e14\u0e01\u0e47\u0e15\u0e32\u0e21<br \/>\n     \u0e14\u0e39\u0e40\u0e2b\u0e21\u0e37\u0e2d\u0e19\u0e27\u0e48\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e25\u0e1a\u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 {@link SystemTray#remove(TrayIcon)})<br \/>\n     * @param image \u0e40\u0e1b\u0e25\u0e35\u0e48\u0e22\u0e19\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e41\u0e15\u0e01\u0e15\u0e48\u0e32\u0e07\u0e08\u0e32\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19\u0e40\u0e17\u0e48\u0e32\u0e19\u0e31\u0e49\u0e19<br \/>\n     *\/<br \/>\n    public static void replaceImageWithDelete(Image image) {<br \/>\n        \u0e0b\u0e34\u0e07\u0e42\u0e04\u0e23\u0e44\u0e19\u0e0b\u0e4c (INSTANCE_LOCK) {<br \/>\n            \u0e16\u0e49\u0e32 (!image.equals(trayIcon.getImage())) {<br \/>\n                tray.remove(trayIcon);<br \/>\n                trayIcon.setImage(image);<br \/>\n                \u0e1e\u0e22\u0e32\u0e22\u0e32\u0e21 {<br \/>\n                    tray.add(trayIcon);<br \/>\n                } catch (Exception e) {<br \/>\n                    e.printStackTrace();<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e41\u0e08\u0e49\u0e07\u0e40\u0e15\u0e37\u0e2d\u0e19\u0e41\u0e1a\u0e1a\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1e\u0e08\u0e30\u0e1b\u0e23\u0e32\u0e01\u0e0f\u0e02\u0e36\u0e49\u0e19\u0e43\u0e19\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19<br \/>\n     * @param caption<br \/>\n     * @param text<br \/>\n     *\/<br \/>\n    public static void displayMessage(String caption, String text) {<br \/>\n        if (caption != null || text != null) {<br \/>\n            trayIcon.displayMessage(caption, text,<br \/>\n                    TrayIcon.MessageType.INFO);<br \/>\n        }<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e25\u0e1a\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e41\u0e16\u0e1a\u0e07\u0e32\u0e19 \u0e41\u0e25\u0e49\u0e27\u0e22\u0e49\u0e32\u0e22\u0e44\u0e1b\u0e22\u0e31\u0e07\u0e40\u0e14\u0e2a\u0e01\u0e4c\u0e17\u0e47\u0e2d\u0e1b<br \/>\n     *\u0e19\u0e33\u0e2d\u0e2d\u0e01\u0e44\u0e1b<br \/>\n     *\/<br \/>\n    private static void active() {<br \/>\n        \/\/ \u0e04\u0e37\u0e19\u0e04\u0e48\u0e32\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e02\u0e2d\u0e07\u0e40\u0e1f\u0e23\u0e21\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19\u0e1b\u0e01\u0e15\u0e34<br \/>\n        TaskTrayUtil.frame.setExtensedState(JFrame.NORMAL);<br \/>\n        TaskTrayUtil.frame.setAlwaysOnTop(true);<br \/>\n        TaskTrayUtil.frame.setVisible(true);<br \/>\n        TaskTrayUtil.frame.setAlwaysOnTop(false);<br \/>\n    }<\/p>\n<p>    \/**<br \/>\n     * \u0e40\u0e2b\u0e15\u0e38\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e17\u0e35\u0e48\u0e40\u0e01\u0e34\u0e14\u0e02\u0e36\u0e49\u0e19\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e04\u0e25\u0e34\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e01\u0e30\u0e1e\u0e23\u0e34\u0e1a<br \/>\n     * \u0e04\u0e25\u0e32\u0e2a\u0e1c\u0e39\u0e49\u0e1f\u0e31\u0e07<br \/>\n     *\/<br \/>\n    \u0e04\u0e25\u0e32\u0e2a ChangeLightImgAdapter \u0e43\u0e0a\u0e49 WindowListener, MouseListener {<br \/>\n        \u0e2a\u0e15\u0e23\u0e34\u0e07 lightImageText;<\/p>\n<p>        public ChangeLightImgAdapter(String lightImageText) {<br \/>\n            this.lightImageText = lightImageText;<br \/>\n        }<\/p>\n<p>        \/**<br \/>\n         * \u0e40\u0e21\u0e37\u0e48\u0e2d\u0e04\u0e25\u0e34\u0e01\u0e44\u0e2d\u0e04\u0e2d\u0e19\u0e16\u0e32\u0e14\u0e23\u0e30\u0e1a\u0e1a<br \/>\n         * \u0e41\u0e2a\u0e14\u0e07\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e1b\u0e4a\u0e2d\u0e1b\u0e2d\u0e31\u0e1e<br \/>\n         *\/<br \/>\n        public void mousePressed(MouseEvent e) {<br \/>\n            TaskTrayUtil.displayMessage(null, lightImageText);<br \/>\n        }<\/p>\n<p>        \/**<br \/>\n         * \u0e44\u0e1f\u0e08\u0e30\u0e01\u0e30\u0e1e\u0e23\u0e34\u0e1a\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e41\u0e2d\u0e1b\u0e1e\u0e25\u0e34\u0e40\u0e04\u0e0a\u0e31\u0e19\u0e40\u0e1b\u0e49\u0e32\u0e2b\u0e21\u0e32\u0e22\u0e40\u0e23\u0e34\u0e48\u0e21\u0e17\u0e33\u0e07\u0e32\u0e19<br \/>\n         * \u0e01\u0e39\u0e49\u0e04\u0e37\u0e19\u0e44\u0e2d\u0e04\u0e2d\u0e19<br \/>\n         *\/<br \/>\n        public void windowActivated(WindowEvent e) {<br \/>\n            TaskTrayUtil.replaceImageWithDelete(TaskTrayUtil.frame<br \/>\n                    .getIconImage());<br \/>\n            TaskTrayUtil.frame.removeWindowListener(this);<br \/>\n            TaskTrayUtil.trayIcon.removeMouseListener(this);<br \/>\n        }<\/p>\n<p>        public void windowClosed(WindowEvent e) {}<\/p>\n<p>        public void windowClosing(WindowEvent e) {}<\/p>\n<p>        public void windowDeactivated(WindowEvent e) {}<\/p>\n<p>        public void windowDeiconified(WindowEvent e) {}<\/p>\n<p>        public void windowIconified(WindowEvent e) {}<\/p>\n<p>        public void windowOpened(WindowEvent e) {}<\/p>\n<p>        public void mouseClicked(MouseEvent e) {}<\/p>\n<p>        public void mouseEntered(MouseEvent e) {}<\/p>\n<p>        public void mouseExited(MouseEvent e) {}<\/p>\n<p>        public void mouseReleased(MouseEvent e) {}<br \/>\n    }<br \/>\n}<br \/>\n<\/textarea><\/p>","protected":false},"excerpt":{"rendered":"<p>Java\u3067\u30bf\u30b9\u30af\u30c8\u30ec\u30a4\uff08\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\uff09\u306e\u30a2\u30a4\u30b3\u30f3\u3092\u8868\u793a\u30fb\u70b9\u6ec5 Java\u3067\u30bf\u30b9\u30af\u30c8\u30ec\u30a4\uff08\u30b7\u30b9\u30c6\u30e0\u30c8\u30ec\u30a4\uff09\u306e\u30a2\u30a4 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[19],"tags":[],"class_list":["post-906","post","type-post","status-publish","format-standard","hentry","category-java"],"_links":{"self":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/comments?post=906"}],"version-history":[{"count":14,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/906\/revisions"}],"predecessor-version":[{"id":3679,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/posts\/906\/revisions\/3679"}],"wp:attachment":[{"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/media?parent=906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/categories?post=906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chat-messenger.com\/th\/wp-json\/wp\/v2\/tags?post=906"}],"curies":[{"name":"\u0e14\u0e31\u0e1a\u0e40\u0e1a\u0e34\u0e25\u0e22\u0e39\u0e1e\u0e35","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}