我想使用JavaFX创建带有类似于Firefox配置面板的图标的选项卡面板:

有没有我可以用来看看如何实现这个的例子?
我想实现这个代码
public void testGetExchangeRate() throws Exception
{
ECKey key = KeyUtils.createEcKey();
String clientName = "server 1";
BitPay bitpay = new BitPay(key, clientName);
if (!bitpay.clientIsAuthorized(BitPay.FACADE_MERCHANT))
{
// Get Merchant facade authorization code
String pairingCode = bitpay.requestClientAuthorization(
BitPay.FACADE_MERCHANT);
// Signal the device operator that this client needs to
// be paired with a merchant account.
System.out.print("Info: Pair this client with your merchant account using the pairing Code: " + pairingCode);
throw new BitPayException("Error:client is not authorized for Merchant facade");
} …Run Code Online (Sandbox Code Playgroud) 我想设置电子表格单元格背景颜色和文本大小.我使用这个Java代码将文本设置为单元格,但我找不到如何设置样式的解决方案.
CellData setUserEnteredValue = new CellData()
.setUserEnteredValue(new ExtendedValue()
.setStringValue("cell text"));
Run Code Online (Sandbox Code Playgroud)
有什么解决方案吗?
代码重构后,当我尝试编译 Maven 项目时出现此错误:
"C:\Program Files\Java\jdk-14\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\plte1219\Desktop\CJM\media_auth -Xmx1024m -XX:MaxPermSize=512m "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\lib\idea_rt.jar=59675:C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version2020.1.2 clean package
Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.engine:engine_auth >-----------------------
[INFO] Building engine_auth 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ engine_auth ---
[INFO] …Run Code Online (Sandbox Code Playgroud) 我有一个简单的JSF输入表单到编辑页面和Validator,它检查重复的值:
<td>Name</td>
<td>
<h:outputText value="#{ud.name}"
rendered="#{not DCProfileTabGeneralController.editable}" />
<h:inputText id="dcname" value="#{ud.name}" rendered="#{DCProfileTabGeneralController.editable}"
validator="#{ValidatorDatacenterController.validateDatacenterName}" autocomplete="off">
<f:ajax event="blur" render="dcnamevalidator" />
</h:inputText>
<h:message id="dcnamevalidator" for="dcname" />
</td>
public void validateDatacenterName(FacesContext context, UIComponent component, Object value){
....
}
Run Code Online (Sandbox Code Playgroud)
我感兴趣的是有没有办法发送第二个值用于验证过程?
我有这个未修饰的窗口:
public static void initStartPage(final Stage primaryStage) {
final Stage startPage = new Stage();
startPage.initStyle(StageStyle.UNDECORATED);
//startPage.initOwner(primaryStage);
//startPage.toFront();
Scene scene = new Scene(agentsPanel(), 900, 500);
startPage.setScene(scene);
startPage.show();
}
Run Code Online (Sandbox Code Playgroud)
我很感兴趣如何让它拖动可拖动?我希望我将鼠标光标放在它上面以拖动它来改变它的位置.
PS
我测试了这个解决方案,但它不起作用:
private static FlowPane flow;
private static BorderPane bpi;
public static void initStartPage(final Stage primaryStage) {
final Stage startPage = new Stage();
startPage.initStyle(StageStyle.UNDECORATED);
startPage.initOwner(primaryStage);
//startPage.toFront();
Scene scene = new Scene(agentsPanel(primaryStage), 900, 500);
startPage.setScene(scene);
startPage.show();
}
private static double xOffset = 0;
private static double yOffset = 0;
public static BorderPane agentsPanel(final …Run Code Online (Sandbox Code Playgroud) 我发现这个SQL查询显示MySQL正常运行时间
SHOW GLOBAL STATUS LIKE 'Uptime';
Run Code Online (Sandbox Code Playgroud)
但我得到的价值2059555
我怎么能在几天内转换它?
我想使用Apache Shiro进行数据库身份验证.但我无法进行数据库设计更改.我想使用我的自定义SQL命令和Java逻辑来验证用户.这可能吗?我在shiro.ini中尝试了这个配置:
saltedJdbcRealm = com.crm.web.authentication.JdbcRealm
和自定义Java类:
public class JdbcRealm extends AuthorizingRealm
{
@Resource(name = "jdbc/DefaultDB")
private DataSource dataSource;
protected static final String DEFAULT_AUTHENTICATION_QUERY = "select passwd from user where username = ?";
protected static final String DEFAULT_SALTED_AUTHENTICATION_QUERY = "select passwd, passwd_salt from user where username = ?";
protected static final String DEFAULT_USER_ROLES_QUERY = "select role_name from user_roles where username = ?";
protected static final String DEFAULT_PERMISSIONS_QUERY = "select permission from roles_permissions where role_name = ?";
private static final Logger log …Run Code Online (Sandbox Code Playgroud) 我想配置Wildfly 14以使用加密的JDBC连接.我试过这个:
MariaDB的:
mysql -u root -p
CREATE USER 'wildfly' IDENTIFIED BY 'qwerty';
CREATE DATABASE production_gateway;
GRANT ALL PRIVILEGES ON production_gateway.* TO 'wildfly'@'%' REQUIRE SSL;
FLUSH PRIVILEGES;
Run Code Online (Sandbox Code Playgroud)
创建证书:
mkdir -p /etc/mysql/ssl
cd /etc/mysql/ssl
sudo openssl genrsa 4096 > ca-key.pem
sudo openssl req -new -x509 -nodes -days 36500 -key ca-key.pem -out cacert.pem
sudo openssl req -newkey rsa:4096 -days 36500 -nodes -keyout server-key.pem -out server-req.pem
sudo openssl rsa -in server-key.pem -out server-key.pem
sudo openssl x509 -req -in server-req.pem -days 36500 -CA cacert.pem …Run Code Online (Sandbox Code Playgroud) 我想配置 Maven 以使用这些依赖项运行 Junit 5 测试:
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0-M1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0-M1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.0-M1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.7.0-M1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>3.3.3</version>
<scope>test</scope>
</dependency>
Run Code Online (Sandbox Code Playgroud)
但我得到了例外:
"C:\Program Files\Java\jdk-14\bin\java.exe"
Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/platform/commons/util/ClassNamePatternFilterUtils
at org.junit.platform.launcher.core.LauncherFactory.loadAndFilterTestExecutionListeners(LauncherFactory.java:113)
at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:99)
at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:72)
at com.intellij.junit5.JUnit5IdeaTestRunner.createListeners(JUnit5IdeaTestRunner.java:46)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:31)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.util.ClassNamePatternFilterUtils
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
Run Code Online (Sandbox Code Playgroud)
你知道我该如何解决这个问题吗?