Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JBrowser Source Code Files
JBrowser Source Code Files are provided in the
source package file.
You can download JBrowser source package as described in the previous tutorial and go to the "src" sub-folder to view Source Code files.
You can also browse JBrowser Source Code files below:
✍: FYIcenter
⏎ org/mozilla/browser/impl/components/JFakeTooltip.java
package org.mozilla.browser.impl.components;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Point;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.Border;
public class JFakeTooltip extends JDialog {
private static final long serialVersionUID = -5265135238377781454L;
private JLabel tooltipLabel;
public JFakeTooltip() {
init();
}
public void init() {
setDefaultLookAndFeelDecorated(false);
setUndecorated(true);
setFocusable(false);
setFocusableWindowState(false);
//alwaysonTop paints tooltip also
//above other windows
//setAlwaysOnTop(true);
JPanel box = new JPanel();
Border border = UIManager.getBorder("ToolTip.border"); //$NON-NLS-1$
box.setBorder(border);
box.setLayout(new BorderLayout());
tooltipLabel = new JLabel(""); //$NON-NLS-1$
tooltipLabel.setHorizontalAlignment(SwingConstants.CENTER);
Color fg = UIManager.getColor("ToolTip.foreground"); //$NON-NLS-1$
Color bg = UIManager.getColor("ToolTip.background"); //$NON-NLS-1$
Font f = UIManager.getFont("ToolTip.font"); //$NON-NLS-1$
tooltipLabel.setOpaque(true);
tooltipLabel.setForeground(fg);
tooltipLabel.setBackground(bg);
tooltipLabel.setFont(f);
//add space at the sides
Border b = BorderFactory.createEmptyBorder(0,3,0,3);
tooltipLabel.setBorder(b);
box.add(tooltipLabel, BorderLayout.CENTER);
setContentPane(box);
}
public void setup(int x, int y, String aText)
{
tooltipLabel.setText(aText);
//start with coordinates relative to mozilla canvas
Point loc = new Point(x,y);
//relocate coordinates relative to parent window
SwingUtilities.convertPointToScreen(loc, getParent());
//add size of the cursor
loc.translate(15, 15);
setLocation(loc);
pack();
}
public JLabel getTooltipLabel() {
return tooltipLabel;
}
}
⏎ org/mozilla/browser/impl/components/JFakeTooltip.java
Or download all of them as a single archive file:
File name: jbrowser-1.9-fyi.zip File size: 625318 bytes Release date: 2022-11-10 Download
⇐ Download and Install JBrowser Source Package
2017-07-17, ≈42🔥, 1💬
Popular Posts:
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...
JBrowser Source Code Files are provided in the source package file. You can download JBrowser source...
JDK 17 java.security.jgss.jmod is the JMOD file for JDK 17 Security JGSS (Java Generic Security Serv...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
JavaMail Source Code Files are provided in the source package file, httpcomponents-client-5. 2-src.zi...