我想固定我的桌子的标题.表存在于可滚动div中.以下是我的代码.
<div id="table-wrapper">
<div id="table-scroll">
<table bgcolor="white" border="0" cellpadding="0" cellspacing="0" id="header-fixed" width="100%" overflow="scroll" class="scrollTable">
<thead>
<tr>
<th>Order ID</th>
<th>Order Date</th>
<th>Status</th>
<th>Vol Number</th>
<th>Bonus Paid</th>
<th>Reason for no Bonus</th>
</tr>
</thead>
<tbody>
<tr>
<td><%=snd.getOrderId()%></td>
<td><%=snd.getDateCaptured()%></td>
<td><%=snd.getOrderStatus()%></td>
<td>Data Not Available</td>
<td>Data Not Available</td>
<td>Data Not Available</td>
</tr>
</tbody>
</table>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
下面是我的CSS,我用于上面的div:
#table-wrapper {
position:relative;
}
#table-scroll {
height:250px;
overflow:auto;
margin-top:20px;
}
#table-wrapper table {
width:100%;
}
#table-wrapper table * {
background:white;
color:black;
}
#table-wrapper table thead th .text {
position:absolute; …Run Code Online (Sandbox Code Playgroud) 这里
System.getProperty("user.name");
Run Code Online (Sandbox Code Playgroud)
返回 Windows Server 2008 机器的主机名,而不是当前登录的用户名。
下面是我的代码
final String user = System.getProperty("user.name");
logger.info("User Name : " + user);
Run Code Online (Sandbox Code Playgroud)
我想知道 System.getProperty 如何在 java 和 windows server 2008 上工作?为什么在这种情况下它返回错误的值?
我想在JavaFX应用程序中禁用特定时间的按钮.有没有选择这样做?如果没有,是否有任何解决方法?
以下是我的应用程序代码.我试过Thread.sleep,但我知道这不是阻止用户点击下一个按钮的好方法.
nextButton.setDisable(true);
final Timeline animation = new Timeline(
new KeyFrame(Duration.seconds(delayTime),
new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
nextButton.setDisable(false);
}
}));
animation.setCycleCount(1);
animation.play();
Run Code Online (Sandbox Code Playgroud) 这里的方案是程序正确读取输出,它也在日志文件中正确打印,但是当在JAVAFX文本区域上显示相同的输出时,其格式会发生变化(以表格格式显示)并且无法正确显示.
以下是写入日志文件的输出:
****************PR Deploy Summary Report Start****************
Folder Server Type Failed
010_StyleSheets 10.5.50.195 SS 0
010_StyleSheets 10.5.50.195 WS 0
020_XSL 10.5.50.195 SS 0
030_XSLT 10.5.50.195 SS 0
040_WebTemplates 10.5.50.195 SS 0
****************PR Deploy Summary Report****************
Run Code Online (Sandbox Code Playgroud)
实际上,当我从文本区域复制它并将其粘贴到其他地方时,它的agian以表格格式正确显示它.但它没有在文本区域正确显示它.为此编写了非常简单的代码,如下所示:
DeploymentTaskController.actLogTArea.appendText(UnixBoxTask.summary.toString());
DeploymentTaskController.actLogTArea.end();
Run Code Online (Sandbox Code Playgroud)
这里"actLogTArea"是文本区域的引用,摘要是StringBuilder ...谁能猜到这里有什么问题?任何解决方案,如果有人已经面对这个?我可能有问题的图像是不可见的.
你好,我想以表格格式打印 hashmap 的数据。下面是我在 hashmap 中插入数据的代码。
String foldername = item.getParent().substring(item.getParent().lastIndexOf("/") + 1);
statusname = foldername + "\t" + _DeployResult.ServerIP + "\t" + _DeployResult.ServerType;
if (!Prdeploy.statusmap.containsKey(statusname)) {
Prdeploy.statusmap.put(statusname, 0);
}
Run Code Online (Sandbox Code Playgroud)
下面是为打印日志文件中的数据而编写的代码:
logger.info("****************Summary Report****************");
logger.info("Folder\tServer\tType\tFailed");
for (String name: statusmap.keySet()){
String key =name.toString();
String value = statusmap.get(name).toString();
System.out.println(key + " " + value);
logger.info(key + "\t" + value);
}
logger.info("**********************************************");
Run Code Online (Sandbox Code Playgroud)
在这里我得到上面的输出如下:
****************Summary Report****************
Folder Server Type Failed
180_Perl_Scripts 10.5.50.195 SS 0
050_Images 10.5.50.195 SS 0
020_XSL 10.5.50.195 SS 0
srf 10.5.50.195 SS 0
030_XSLT …Run Code Online (Sandbox Code Playgroud) java ×3
javafx-2 ×2
collections ×1
css ×1
css-position ×1
html ×1
logging ×1
string ×1
windows ×1