下面列出了怎么用javax.swing.plaf.metal.MetalToolTipUI的API类实例代码及写法,或者点击链接到github查看源代码。
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}
private static void checkToolTip() throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
JToolTip tooltip = (JToolTip) Util.findSubComponent(
JFrame.getFrames()[0], "JToolTip");
if (tooltip == null) {
throw new RuntimeException("Tooltip has not been found!");
}
MetalToolTipUI tooltipUI = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip);
tooltipUI.installUI(tooltip);
if (!"-Insert".equals(tooltipUI.getAcceleratorString())) {
throw new RuntimeException("Tooltip acceleration is not properly set!");
}
}
});
}