我使用默认的JavaFX选项卡窗格布局

我想在旧的标签下方显示新标签.我不想显示默认上下文菜单来选择要显示的选项卡.有没有改变这个的选择?
我注意到当我在JVM 7和JVM 8上运行JavaFX应用程序时,我获得了不同的默认外观.如何在每个JVM上将默认外观设置为相同?
我测试了使用Netbeans 7.4创建JavaFX 8项目.但遗憾的是没有运气.这是POM文件:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dx57dc</groupId>
<artifactId>JFX8M</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>JFX8M</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.dx57dc.jfx8m.MainApp</mainClass>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath> …Run Code Online (Sandbox Code Playgroud) 有没有办法将Java应用程序编码为仅使用CPU的2个CPU内核.例如,我想设置CPU利用率的限制.这在Java中可行吗?
我想将java arraylist显示到JSF页面中.我从数据库生成了arraylist.现在我想通过索引号调用列表元素索引将列表显示到JSF页面.是否可以直接从JSF页面中的EL表达式向bean方法传递参数并显示它?
实时更新折线图
我想修改这个简单的折线图示例并添加实时更新.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.stage.Stage;
public class LineChartSample extends Application {
@Override public void start(Stage stage) {
stage.setTitle("Line Chart Sample");
//defining the axes
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
//creating the chart
final LineChart<Number,Number> lineChart =
new LineChart<Number,Number>(xAxis,yAxis);
lineChart.setTitle("Stock Monitoring, 2010");
//defining a series
XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
//populating the series with data
series.getData().add(new XYChart.Data(1, 23));
series.getData().add(new XYChart.Data(2, 14)); …Run Code Online (Sandbox Code Playgroud) 我在显示套接字的/ proc中找到此信息:
$ cat /proc/net/sockstat
sockets: used 8278
TCP: inuse 1090 orphan 2 tw 18 alloc 1380 mem 851
UDP: inuse 6574
RAW: inuse 1
FRAG: inuse 0 memory 0
Run Code Online (Sandbox Code Playgroud)
您能帮我找出这些值的含义吗?这些值是否足够可靠,还是我需要在其他地方搜索?
这些其他方法可以找到有关Linux中TCP / UDP连接的信息吗?
我想将 TIMESTAMP 插入 LAST_LOGIN 列
CREATE TABLE USER(
ID INTEGER NOT NULL,
USER_NAME TEXT,
FIRST_NAME TEXT,
LAST_NAME TEXT,
LAST_LOGIN DATE,
DATE_REGISTERED DATE,
ROLE INTEGER,
CAN_LOGIN INTEGER
)
;
ALTER TABLE USER ADD CONSTRAINT KEY1 PRIMARY KEY (ID)
;
Run Code Online (Sandbox Code Playgroud)
我试过这个:
UPDATE USERS SET LAST_LOGIN = TIMESTAMP WHERE USER_NAME = ?
Run Code Online (Sandbox Code Playgroud)
但我得到 org.postgresql.util.PSQLException: ERROR: column "timestamp" does not exist Position: 31
将当前时间插入表列 LAST_LOGIN 的正确方法是什么?
我想为JSF表添加过滤器,并根据过滤器值限制值.
<h:inputText id="search" value="#{accounts.searchString}"></h:inputText>
<h:commandButton value="Search" action="#{accounts.search()}">
<f:ajax execute="search" render="output"></f:ajax>
</h:commandButton>
Run Code Online (Sandbox Code Playgroud)
我想最好的方法是将过滤器值添加到SQL查询中:
SELECT * FROM CUSTOMERS ORDER BY %S %S offset ? limit ?
Run Code Online (Sandbox Code Playgroud)
完整代码:http://pastebin.com/eEeTWEqK
我如何将代码实现为链接?
PS.我这样修改了代码:
<div class="div_input_style">
<h:inputText id="search" class="input_style" value="#{accounts.searchString}"></h:inputText>
<h:commandButton class="theSpan" value="Search by title">
<f:ajax execute="search" render="output"></f:ajax>
</h:commandButton>
</div>
Run Code Online (Sandbox Code Playgroud)
public List<AccountsObj> list(int firstRow, int rowCount, String sortField, boolean sortAscending) throws SQLException
{
String SqlStatement = null;
if (ds == null)
{
throw new SQLException();
}
Connection conn = ds.getConnection();
if (conn == null) …Run Code Online (Sandbox Code Playgroud) 我有这个JPA查询,我想从Spring生成Angular Barchart:
public List<PaymentTransactionsDailyFacts> findPaymentTransactionsDailyFacts(LocalDateTime start_date, LocalDateTime end_date) {
String hql = "SELECT SUM(amount) AS sum_volume, COUNT(*) AS sum_Transactions " +
" WHERE (created_at BETWEEN :start_date AND :end_date )" +
" GROUP BY DATE(created_at)";
TypedQuery<PaymentTransactionsDailyFacts> query = entityManager.createQuery(hql,
PaymentTransactionsDailyFacts.class).setParameter("start_date", start_date).setParameter("end_date", end_date);
List<PaymentTransactionsDailyFacts> data = query.getResultList();
return data;
}
Run Code Online (Sandbox Code Playgroud)
预期的查询结果:
Date | Amount| Number of transactions per day |
11-11-2018 | 30 | 3 |
11-12-2018 | 230 | 13 |
Run Code Online (Sandbox Code Playgroud)
JPA查询中的映射对象:
public class DashboardDTO {
private Date date;
private int …Run Code Online (Sandbox Code Playgroud) javafx-8 ×4
javafx ×3
javafx-2 ×3
java ×2
jsf ×2
angular ×1
angular6 ×1
arraylist ×1
el ×1
jsf-2 ×1
linux ×1
maven ×1
maven-3 ×1
maven-plugin ×1
networking ×1
postgresql ×1
proc ×1
sockets ×1
sql ×1
typescript ×1