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, ≈25🔥, 1💬
Popular Posts:
What Is fop.jar? I got it from the fop-2.7-bin.zip. fop.jar in fop-2.7-bin.zip is the JAR file for F...
JDK 11 java.smartcardio.jmod is the JMOD file for JDK 11 Smartcardio module. JDK 11 Smart Card IO mo...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...