在Swing应用程序中,JFrame不会根据屏幕分辨率更改其大小行为。
我试过
pack();
和
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension d = toolkit.getScreenSize();
height = d.height;
width = d.width;
this.setSize(width, height);
和
GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
width = gd.getDisplayMode().getWidth();
height = gd.getDisplayMode().getHeight();
使用GraphicsDevice没有变化。
当我更改分辨率时,JFrame和组件位于任务栏后面,并且不会显示完整的帧。
我希望JFrame和所有组件根据各种屏幕分辨率调整大小。
答案 0 :(得分:1)
你可以试试这个:
$stmt = $con->prepare("SELECT * from dictionary,term_dic where dictionary.task_ID = ? and term_dic.task_ID = ? ");
//execute The Statment
$stmt->execute(array($task,$task));
// Assign To Variable
$rows=$stmt->fetchAll();
?>
<h1 class="text-center"><?php echo $_SESSION['TaskName']; ?></h1>
<div class="container">
<div class="table-responsive">
<table class ="main-table text-center table table-bordered">
<tr>
<td>#ID</td>
<td>Word</td>
<td>From</td>
<td>To</td>
<td>Face EXP</td>
<td>Registerd Date</td>
<td>Control</td>
</tr>
<?php
foreach ($rows as $row) {
echo"<tr>";
echo "<td>".$row['dic_ID'] . "</td>";
echo "<td>".$row['word'] . "</td>";
echo "<td>".$row['start_from'] . "</td>" ;
echo "<td>".$row['end_to'] . "</td>" ;
echo "<td>".$row['face_exp'] . "</td>" ;
echo "<td>".$row['date_reg'] ."</td>";
echo "<td><a href='dictionary.php?do=Edit&userid=". $row['dic_ID'] ."' class='btn btn-success'><i class='fa fa-edit'></i> Edit</a>
<a href='dictionary.php?do=Delete&userid=". $row['dic_ID'] ."' class='btn btn-danger confirm'><i class='fa fa-close'></i> Delete </a>";
echo "</td>";
echo "</tr>";
}
?>